factory-0.3.0.0: Rational arithmetic in an irrational world.

Safe HaskellNone
LanguageHaskell2010

Factory.Math.ArithmeticGeometricMean

Contents

Description

AUTHOR
Dr. Alistair Ward
DESCRIPTION
Determines the Arithmetic-geometric mean; https://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.