Calculating Pi

Pi

Why calculate Pi to higher and higher precision? I don't really know - it's as pointless as climbing a mountain - we do it simply because it's there, or to break a record! But it's a great number crunching exercise.

Calculating Pi is fascinating subject. I recently came across some of the latest research on the Web, and I knocked together a Delphi program to prove to myself that some of the amazing formulas actually work. You can download it here. I have included the source, because this is probably more interesting than running it! It uses the greatest precision available on the Pentium - IEEE extended 80-bit, but this, of course, limits the results to about 18 decimal places.

I found most of this stuff at Ramanujan, Modular Equations, and Approximations to Pi or How to compute One Billion Digits of Pi

It's hard to represent the formulas in text, so while you play with the Pi program, here are the actual formulas used:


The Miraculous Bailey-Borwein-Plouffe Pi Algorithm

Sum 1 (Ramanujan)

Ramanujan formula

Chudnovsky Brothers

Algorithm 1

Let and . Let

and

Then

and converges to quartically (that is, with order four).


Here are some other links to sites discussing Pi:

On the computation of the n'th decimal digit of various transcendental numbers

The first four thousand decimal places of Pi

Extraordinary Pi

Yahoo! - Science:Mathematics:Numbers:Specific Numbers:Pi:Calculating Pi

Fun with PI

Chris Shaw's Pi Page