- Dr. Alistair Ward
- Defines the unit with which precision is measured, and operations on it.
- type ConvergenceOrder = Int
- type ConvergenceRate = Double
- type DecimalDigits = Int
- linearConvergence :: ConvergenceOrder
- quadraticConvergence :: ConvergenceOrder
- cubicConvergence :: ConvergenceOrder
- quarticConvergence :: ConvergenceOrder
- getIterationsRequired :: Integral i => ConvergenceOrder -> DecimalDigits -> DecimalDigits -> i
- getTermsRequired :: Integral i => ConvergenceRate -> DecimalDigits -> i
- roundTo :: (RealFrac a, Fractional f) => DecimalDigits -> a -> f
- promote :: Num n => n -> DecimalDigits -> n
- simplify :: RealFrac operand => DecimalDigits -> operand -> Rational
The order of convergence; http://en.wikipedia.org/wiki/Rate_of_convergence.
The rate of convergence; http://en.wikipedia.org/wiki/Rate_of_convergence.
Linear convergence-rate; which may be qualified by the rate of convergence.
|:: Integral i|
The precision of the initial estimate.
The required precision.
The predicted number of iterations, required to achieve a specific accuracy, at a given order of convergence.
|:: Integral i|
The additional number of correct decimal digits.
- The predicted number of terms which must be extracted from a series, if it is to converge to the required accuracy, at the specified linear convergence-rate.
- The convergence-rate of a series, is the error in the series after summation of
(n+1)thterms, divided by the error after only
nterms, as the latter tends to infinity. As such, for a convergent series (in which the error get smaller with successive terms), it's value lies in the range
0 .. 1.
Rounds the specified number, to a positive number of
Promotes the specified number, by a positive number of
|:: RealFrac operand|
The number of places after the decimal point, which are required.
- Reduces a
Rationalto the minimal form required for the specified number of fractional decimal places; irrespective of the number of integral decimal places.
Rationalapproximation to an irrational number, may be very long, and provide an unknown excess precision. Whilst this doesn't sound harmful, it costs in performance and memory-requirement, and being unpredictable isn't actually useful.