factory-0.0.0.2: Rational arithmetic in an irrational world.

Factory.Math.ArithmeticGeometricMean

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Determines the Arithmetic-geometric mean; http://en.wikipedia.org/wiki/Arithmetic-geometric_mean.

Synopsis

Types

Type-synonyms

type AGM = (ArithmeticMean, GeometricMean)Source

Encapsulates both arithmetic and geometric means.

Functions

convergeToAGM :: Algorithm squareRootAlgorithm => squareRootAlgorithm -> DecimalDigits -> AGM -> [AGM]Source

Returns an infinite list which converges on the Arithmetic-geometric mean.

spread :: AGM -> RationalSource

Returns the bounds within which the AGM has been constrained.

Accessors

Predicates

isValid :: AGM -> BoolSource

Checks that both means are positive, as required for the geometric mean to be consistently real.