Safe Haskell | None |
---|---|
Language | Haskell2010 |
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Determines the Arithmetic-geometric mean; https://en.wikipedia.org/wiki/Arithmetic-geometric_mean.
- type ArithmeticMean = Rational
- type GeometricMean = Rational
- type AGM = (ArithmeticMean, GeometricMean)
- convergeToAGM :: Algorithmic squareRootAlgorithm => squareRootAlgorithm -> DecimalDigits -> AGM -> [AGM]
- spread :: AGM -> Rational
- getArithmeticMean :: AGM -> ArithmeticMean
- getGeometricMean :: AGM -> GeometricMean
- isValid :: AGM -> Bool
Types
Type-synonyms
type ArithmeticMean = Rational Source #
The type of the arithmetic mean; https://en.wikipedia.org/wiki/Arithmetic_mean.
type GeometricMean = Rational Source #
The type of the geometric mean; https://en.wikipedia.org/wiki/Geometric_mean.
type AGM = (ArithmeticMean, GeometricMean) Source #
Encapsulates both arithmetic and geometric means.
Functions
convergeToAGM :: Algorithmic squareRootAlgorithm => squareRootAlgorithm -> DecimalDigits -> AGM -> [AGM] Source #
Returns an infinite list which converges on the Arithmetic-geometric mean.
Accessors
getArithmeticMean :: AGM -> ArithmeticMean Source #
Accessor.
getGeometricMean :: AGM -> GeometricMean Source #
Accessor.