value of pi and 22/7

Jeffrey Gaynor jgaynor at ncsa.uiuc.edu
Thu Mar 17 13:36:58 EDT 2011


(pulls out doctorate in Math.) Take a circle and measure its diameter, then circumference (coffee cans and string are helpful). Then

pi = Circumference/diameter

approximating that is hard. It turns out that even though it *looks* like a nice fraction, the value that results is not (fractions of integers have the charming property that they always repeat, for instance 22/7 = 3.142857 142857 142857 142857 142857... Pi does not. Again this was a very hard question only answered in the 18th century by Lambert, I do believe.)

It is the simple "fractional" look about pi vs. how hard it is to compute that drives most of the confusion about pi. The digits of pi are in effectively random order (each digit occur roughly 10% of the time), and to compute the nth one you need all the digits before it. Once upon a time (and maybe still) sending back and forth long strings of the digits of pi was a great way to test communications, since each side could look up the result in a table and tell if there were systematic errors. There are fun math questions, for instance, is there a run of a million 1's someplace in the decimal expansion of pi? Maybe so, but we just don't know, since we've only computed the first trillion or so digits. Computing pi also requires a lot of logistical organization too and cranking out the first several hundred million digits is still often used to test systems. 

FWIW my favorite approximation is 355/113. I can always seem to remember that one the best...

Jeff

----- Original Message -----
From: "kracekumar ramaraju" <kracethekingmaker at gmail.com>
To: python-list at python.org
Sent: Thursday, March 17, 2011 11:46:25 AM
Subject: value of pi and 22/7


I tried the following 
>>> 22/7.0 
3.1428571428571428 
>>> import math 
>>> math.pi 
3.1415926535897931 
>>> 


Why is the difference is so much ?is pi =22/7 or something ? 
-- 
winning regards 
kracekumar 

-- 
http://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list