Gauss–Legendre algorithm: Difference between revisions

Content deleted Content added
m sp
Line 15:
:<math> \begin{align} a_{n+1} & = \frac{a_n + b_n}{2}, \\
b_{n+1} & = \sqrt{a_n b_n}, \\
t_{n+1} & = t_n -+ p_n(a_n - a_{n+1})^2, \\
p_{n+1} & = 2p_n.
\end{align}
Line 22:
3. π is then approximated as:
 
:<math>\pi \approx \frac{(a_n^2+b_n)^2}{4t_n1-t_{n+1}}.\!</math>
 
The first three iterations give (approximations given up to and including the first incorrect digit):