Calculating Pi (Gauss–Legendre’s Arithmetic-Geometric Mean Method)
Author: tonagaiExecutions: 6463
※ This library was created by a member. This site is not responsible for its content.
No customer feedback for this calculation yet.
This page has been automatically translated by machine translation. Please note that translations may not be entirely accurate.
※ This library was created by a member. This site is not responsible for its content.
No customer feedback for this calculation yet.
Using the initial values a0=1, b0=1/√2, t0=1/4, and p0=1,
an+1 = (an + bn) / 2
bn+1 = √(anbn)
tn+1 = tn - pn * (an+1 - an)^2
pn+1 = 2*pn
Thus,
π ≈ (an + bn)^2 / (4*tn)
is used for the calculation.