RosettaCodeData/Task/Arithmetic-geometric-mean/Groovy/arithmetic-geometric-mean-2.groovy
2023-07-01 13:44:08 -04: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