powered by
agm(a, b, maxiter = 25, tol = .Machine$double.eps^(1/2))
abs(a-b) < tol
a
b
## Gauss constant 1 / agm(1, sqrt(2), tol = 1e-15)$agm # 0.834626841674073
Run the code above in your browser using DataLab