Content deleted Content added
Added proper inline display where needed. |
Removed the deprecated use of \! |
||
Line 7:
== Algorithm ==
1. Initial value setting:
:<math>a_0 = 1\qquad b_0 = \frac{1}{\sqrt{2}}\qquad t_0 = \frac{1}{4}\qquad p_0 = 1.
2. Repeat the following instructions until the difference of <math>a_n
:<math> \begin{align} a_{n+1} & = \frac{a_n + b_n}{2}, \\
b_{n+1} & = \sqrt{a_n b_n}, \\
Line 16:
</math>
3. {{pi}} is then approximated as:
:<math>\pi \approx \frac{(a_{n+1}+b_{n+1})^2}{4t_{n+1}}.
The first three iterations give (approximations given up to and including the first incorrect digit):
:<math>3.140\dots
:<math>3.14159264\dots
:<math>3.1415926535897932382\dots
The algorithm has [[quadratic convergence]], which essentially means that the number of correct digits doubles with each [[iteration]] of the algorithm.
Line 38:
which both converge to the same limit.<br />
If <math>a_0=1
:<math>K(k) = \int_0^{\pi/2} \frac{d\theta}{\sqrt{1-k^2 \sin^2\theta}}.
If <math>c_0 = \sin\varphi
:<math>\sum_{i=0}^\infty 2^{i-1} c_i^2 = 1 - {E(\sin\varphi)\over K(\sin\varphi)}
where <math>E(k)
:<math>E(k) = \int_0^{\pi/2}\sqrt {1-k^2 \sin^2\theta}\, d\theta.
Gauss knew of both of these results.<ref name="brent">{{Citation
Line 100:
=== Legendre’s identity ===
For <math>\varphi
:<math>K(\sin \varphi) E(\sin \theta ) + K(\sin \theta ) E(\sin \varphi) - K(\sin \varphi) K(\sin \theta) = {1 \over 2}\pi.
=== Gauss–Euler method ===
The values <math display="inline">\varphi=\theta={\pi\over 4}
== See also ==
|