{{wikipedia|Arithmetic-geometric mean}}
;task:
Write a function to compute the [[wp:Arithmetic-geometric mean|arithmetic-geometric mean]] of two numbers.
[http://mathworld.wolfram.com/Arithmetic-GeometricMean.html]
The arithmetic-geometric mean of two numbers can be (usefully) denoted as , and is equal to the limit of the sequence:
:
:
Since the limit of tends (rapidly) to zero with iterations, this is an efficient method.
Demonstrate the function by calculating:
:
;Also see:
* [http://mathworld.wolfram.com/Arithmetic-GeometricMean.html mathworld.wolfram.com/Arithmetic-Geometric Mean]