Skip to main content

GeometricMean

GeometricMean (a, b)

The GeometricMean function returns the arithmetic-geometric mean of two positive real numbers a and b. The mean is computed by creating two sequences {ai} and {bi} initialized to the input values: a0=a and b0=b with

an+1=12(an+bn),\displaystyle a_{n+1}=\frac{1}{2}\left(a_{n}+b_{n}\right), bn+1=anbn.\displaystyle b_{n+1}=\sqrt{a_{n} b_{n}} .

The two sequences converge in a few iterations to a single value which is the arithmetic-geometric mean.

See Also

EllipticK, EllipticE