RosettaCodeData/Task/Arithmetic-geometric-mean/R/arithmetic-geometric-mean-2.r
2023-07-01 13:44:08 -04:00

4 lines
117 B
R

a <- c(1, 1, 1)
b <- c(1/sqrt(2), 1/sqrt(3), 1/2)
agm <- arithmeticGeometricMean(a, b)
print(format(agm, digits=16))