factory-0.2.1.1: Rational arithmetic in an irrational world.

Safe HaskellNone
LanguageHaskell98

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 :: Algorithmic squareRootAlgorithm => squareRootAlgorithm -> DecimalDigits -> AGM -> [AGM] Source

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

spread :: AGM -> Rational Source

Returns the bounds within which the AGM has been constrained.

Accessors

Predicates

isValid :: AGM -> Bool Source

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