RosettaCodeData/Task/Arithmetic-geometric-mean/Mathematica/arithmetic-geometric-mean.math

3 lines
114 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
PrecisionDigits = 85;
2013-10-27 22:24:23 +00:00
AGMean[a_, b_] := FixedPoint[{ Tr@#/2, Sqrt[Times@@#] }&, N[{a,b}, PrecisionDigits]]〚1〛