Content deleted Content added
→Algorithm: Style Tags: Mobile edit Mobile app edit Android app edit |
|||
Line 6:
== Algorithm ==
:<math>a_0 = 1\qquad b_0 = \frac{1}{\sqrt{2}}\qquad t_0 = \frac{1}{4}\qquad p_0 = 1.\!</math> :<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, \\
Line 13 ⟶ 15:
\end{align}
</math>
:<math>\pi \approx \frac{(a_{n+1}+b_{n+1})^2}{4t_{n+1}}.\!</math> The first three iterations give (approximations given up to and including the first incorrect digit):
|