Wednesday, March 14, 2012

Extra Slices!

As noted just about a year ago, March 14 is often celebrated by the mathematically inclined and by those who are equally as nerdy even if nowhere near as computationally gifted (three guesses as to which group includes me) as "Pi Day." This is because the shorthand version of the date is 3/14, and the first three digits of the ratio number called pi are 3.14.

Pi is simply the ratio of the circumference of a circle (how far it is around the outside) to its diameter (how far it is from one end to the other). This ratio is always the same for any circle you create in Euclidean geometry (non-Euclidean geometry works a little differently, but it involves conceiving of a universe where parallel lines eventually meet, so my head will hurt too much to type), and is often written as the lowercase 16th letter of the Greek alphabet, π.

A friend on Facebook wondered how big of a party they must have had on March 4, 1592, which would have been the date 3/14/1592 and represents π carried out to six decimal places: 3.141592. If they'd noted it, I suspect that it would have been a neat curiosity but probably not the occasion for the many pi/pie puns that folks make today. For one, the ratio was at that time much more likely to be called Archimedes Constant. Although English mathematician and slide rule inventor William Oughtred first used π in about 1600 to abbreviate perimetron, the Greek word which gives us "perimeter," π didn't become widespread until another English mathematician, William Jones, started using it about 100 years later, and became more or less official when Swiss mathematical superstar Leonhard Euler began using it in 1737.

For another, adding a new decimal place to the calculation of π in those days was not the quick little button push operation we have today even in the most basic desktop calculators. The aforementioned Archimedes gained his association with the ratio in the third century B.C. by making some of the more accurate calculations in the ancient world through measuring the area of polygons contained within a particular circle. A 96-sided polygon gave him the value of 3.14185, or about .00026 difference. If you used this value of π to calculate the length of the equator, you'd be off by about 2 miles out of more than 25,000. In 480 or so, Chinese mathematician Zu Chongzi carried the formula to a polygon with 3076 sides and showed that π was between 3.1415926 and 3.1415927. Until algorithmic functions were used to calculate π about 900 years later, this remained the most accurate approximation of π available. Use one of those values to figure the Earth's equator from its diameter and you'd be off by just more than four feet, which would be a lot better than your GPS does.

π is an irrational number, meaning it can't be expressed by an equivalent fraction -- it never ends and it never repeats. The fraction 22/7 is used as an approximation, as is 355/113. Both are as accurate as almost any real-world approximation needs to be.

When Isaac Asimov wrote his essay "A Piece of Pi" in 1960, computers had been calculating values of π for some time, using some of those algorithmic methods instead of geometrical ones. Asimov noted that in 1837, a man named William Shanks finished a 15-year project to compute π to 707 decimal places, by far the most accurate until computers came along and probably the last non-computer-aided calculation of π ever done. The first major computer calculation of π, in 1949, took the ENIAC computer 70 hours to figure it to more than 2000 places (and discovered that Shanks was wrong about five hundred digits in), and modern computers have figured the ratio out into the trillions of digits.

Of course, any estimation of π out to just 11 digits, plugged into the figure-the-equator formula, will give you a distance off by less than one millimeter. And you could draw any circle that fits inside the 15-billion light-year observable universe, multiply its diameter by a value of π accurate out to 39 digits, and get a circumference figure that would be off by less than the width of a hydrogen atom. So all of those extra digits wind up making for a pi that is quite a bit richer than almost anyone needs.


(PS -- The essay was one of those Asimov wrote for the Magazine of Fantasy and Science Fiction from 1958 until shortly before his death in 1992. He had the freedom to tackle any scientific subject he wished and ranged over just about everything; Asimov was blogging before there was a web to blog on. I own it in the 1978 edition of the collection Asimov on Numbers, which I recommend to my fellow non-computationals who like to masquerade as math geeks)

No comments: