Just by thinking that, I had unwittingly joined the ranks of people all through history who have been puzzled, infuriated or just fascinated by pi. (Some even say that the history of pi is the history of man).
So what is this little number anyway? No more, and no less, than the ratio of a circle's circumference to its diameter. Simple. Imagine, if you like, a prehistoric man idly drawing a circle in the sand. Perhaps he wonders what makes it so regular, so symmetric. At some point, he measures its diameter and its circumference, and stumbles on a ratio of about 3.
About, but not exactly.
People came up with better ways to calculate the ratio more accurately. But something was always lacking: nobody could find an exact value. In Babylon, they used the value 3 1/8, while in about 499 AD, the great Indian mathematician Aryabhata wrote this in his Aryabhatiya:
- Add 4 to 100, multiply by 8, and add 62,000. The result is approximately the circumference of a circle of which the diameter is 20,000. [Italics mine]
But from the time of Archimedes -- about the third Century BC -- onwards, the accuracy to which pi could be calculated was "purely a matter of computational ability and perseverance", says Petr Beckmann in his delightful A History of Pi. So simply calculating pi isn't a particularly interesting exercise.
But Archimedes was a great champion of method, and that's the truly interesting thing about the history of pi. Typical of the man, he found a method to calculate pi to any desired degree of accuracy. Later mathematicians used his method to find closer approximations to pi than Archimedes ever did, but get this: it was 19 centuries before a completely new approach to the problem was found.
That was in 1671, when the Scottish mathematician James Gregory found this
- pi = 4 - 4/3 + 4/5 - 4/7 + 4/9 - 4/11 ...
Gregory's series is interesting for being simple, and as a pointer to a whole new way to calculate pi. But it is itself nearly useless for such calculation, as you may have found out. The problem is that it converges far too slowly. Just two decimal place accuracy -- achieved by Archimedes 2000 years before, and surpassed by Aryabhata among many others by the 5th Century -- needs over 300 (!) terms of Gregory's series.
But Gregory had opened serious floodgates. Following in his footsteps was a giant: Isaac Newton. While calculating something else, he tossed out a series for pi that was a bullet train to Gregory's bullock-cart. In just 22 terms, he had pi correct to 16 decimal places. And this, wrote Newton, was "by the way": a fringe benefit from his other work. But as Beckmann points out, even "the crumbs dropped by giants are big boulders."
Leonhard Euler, whom some call the greatest mathematician of all time, churned out formulae for pi almost routinely. Once, he used one of them to calculate pi to 20 decimal places in just an hour. When you remember that Euler's only tools were pen, paper and his remarkable mind, you get an idea of that mind.
Today of course, with plenty of computing power, such feats are easy. Hell, I can't resist: you might say, as easy as 3.1415926535897932384626433832795028841971693993751058209749445923078164 ...