--- from: http://rosettacode.org/wiki/Arithmetic-geometric_mean