In mathematics, the arithmetic–geometric mean (AGM) of two positive real numbers x and y is defined as follows:
First, compute the arithmetic and geometric means of x and y, calling them a1 and g1 respectively (the latter is the principal square root of the product xy):
a
1
=
1
...