RosettaCodeData/Task/Arithmetic-geometric-mean/Groovy/arithmetic-geometric-mean-2.groovy
2015-02-20 00:35:01 -05:00

2 lines
137 B
Groovy

println "agm(1, 0.5**0.5) = agm(1, ${0.5**0.5}) = ${agm(1, 0.5**0.5)}"
assert (0.8472130847939792 - agm(1, 0.5**0.5)).abs() <= 10.0**-14