Computing π

Here is a scheme for computing π that is fairly fast and mathematically very simple. There are certainly faster ways. Initialize x to some approximation of π, say 3. Each iteration of the following triples the number of significant digits:

x ← x+sin x

This works well because if |x – π| < ε ∧ x>0 then |x+sin x – π| < ε3.

How, do we compute sin? The Taylor series is the only way I have thought of. Commercial grade software cheats and assumes the value of π.

Here is a fanciful way to compute √π.

See 106 digits of π. See GMP for some code.

And then musically.

2010 March 14 record
2010 August 6 record
2011 Oct (1013 decimal digits)