Alphabeta Math
RemarkSession-authored (Fable 5 assisted) sources checked 2026-07-26 not proved here
Recorded, not proved here. This statement is included so the library can refer to it honestly, with a citation to the literature. It is not proved anywhere in this library: the track that would prove it has not been developed here yet.

The Gauss-Legendre (Brent-Salamin) AGM algorithm for π\pi

Statement

Gauss-Legendre / Brent-Salamin algorithm. Set

a0=1,b0=12,t0=14,p0=1,a_0 = 1, \qquad b_0 = \tfrac{1}{\sqrt{2}}, \qquad t_0 = \tfrac{1}{4}, \qquad p_0 = 1,

and iterate

an+1=an+bn2,bn+1=anbn,tn+1=tnpn(anan+1)2,pn+1=2pn.a_{n+1} = \frac{a_n + b_n}{2}, \quad b_{n+1} = \sqrt{a_n b_n}, \quad t_{n+1} = t_n - p_n (a_n - a_{n+1})^2, \quad p_{n+1} = 2 p_n.

Then

(an+1+bn+1)24tn+1π,\frac{(a_{n+1} + b_{n+1})^2}{4 t_{n+1}} \longrightarrow \pi,

and the convergence is quadratic: the number of correct digits roughly doubles at each step, so about 2525 iterations already give tens of millions of digits.

Status: settled, but outside this library's stack. Brent and Salamin published the algorithm independently in 1976, and its correctness is a theorem. It is not open. It is also not reachable here: the proof rests on Gauss's arithmetic-geometric mean and its identification with a complete elliptic integral of the first kind, on the companion integral of the second kind, and on Legendre's relation

E(k)K(k)+E(k)K(k)K(k)K(k)=π2,E(k)K(k') + E(k')K(k) - K(k)K(k') = \frac{\pi}{2},

none of which this library develops.

Remarks

Not proved in this library. The algorithm is recorded, not derived, and no page here may present it as established.

What is known, and what would prove it here. Everything about it is known; the only obstacle is prerequisite. What would discharge this item is an elliptic integral track: the AGM iteration and its quadratic convergence, the identity M(1,k)=π/(2K(k))M(1,k') = \pi / (2K(k)) expressing the AGM through the complete elliptic integral KK, the second complete integral EE, and Legendre's relation. That is a substantial classical development in its own right, and it belongs to a page this library does not yet have.

Why it matters here. This library defines π\pi analytically and will prove the elementary series and product formulas for it, including the Leibniz series and the Machin-type arctangent formulas. None of those converges as fast as the AGM iteration, and they do not even all converge at the same rate as each other. The Machin-type arctangent series converge linearly: the error falls by a fixed factor per term, so each further digit costs a bounded number of extra terms. The Leibniz series is worse than linear, and it is worth being exact about how much: its partial sums have error of order 1/n1/n, so each further decimal digit multiplies the number of terms by about ten and a hundred digits are already out of reach. The AGM algorithm converges quadratically, doubling the number of correct digits per step, and it is the reason the record computations of the 1980s and 1990s were feasible at all. Recording it prevents the π\pi pages from leaving the impression that the formulas they can prove are the ones that are actually used.

Used by

Nothing in the library uses this result yet.

Dependency tree · next 3 levels

Nothing. This result depends on no other item in the library.

Sources