Friday, February 20, 2009

For Most Purposes, 355/113 Is Close Enough

Do you have problems remembering the value of pi beyond 3.14?  Or is your calculator lacking the pi key?

Just remember the fraction 355/113 -- it gives the value of pi accurately to 7 decimal places. 3.14159269... The second 9 is where it breaks down, it should be a 5 as you can see in the following truncated 'true' value:

3.14159 26535 89793 23846 26433 83279 50288 41971 69399 37510

But how close is that? Is it close enough?

Obviously, closeness depends upon what you are calculating.  Let's work with the size of the earth. According to, the diameter of the earth is 7,926.28 miles at the equator. (We won't worry about the irritating fact that the earth is not a true sphere but one slightly squashed at the poles.)

Using the above fraction and the value returned by the Excel pi() function, we get values of 24901.1451327434 and 24901.1430182957 for the distance in miles around the equator ( C = pi * D ).  The difference between the two is about 0.00211 miles or about 11.16 feet too long using the 355/113 method.  Or about 0.000008% off.  Sounds like 355/113 is close enough for government work.

Note 1: When doing calculations with mixed multiplications and division -- such as 7926.28 * 355 / 113, make sure you do all the multiplications before you do any divisions.  This will minimize the effects of accumulating round-off errors.

Note 2: When writing the Handyman program for the Color Computer which had no floating point math hardware, I used this method in calculating circular areas such as windows and rugs.  Handyman was an early do-it-yourself home calculator program figuring paint, wallpaper, flooring, etc. needs.

Note 3: 355/113 is the most accurate rational approximation with a denominator less than 10,000.

Note 4: According to Wikipedia, a value of pi "... a value truncated to 11 decimal places is accurate enough to calculate the circumference of the earth with a precision of a millimeter, and one truncated to 39 decimal places is sufficient to compute the circumference of any circle that fits in the observable universe to a precision comparable to the size of a hydrogen atom."  Use the 50-place value given above if you need more accuracy in your work.

1 comment:

  1. Yes I, Molly, understand your point -- am glad to see what you have been doing all these years -- proud to know you - herein I will just quote a brilliant college math teacher ..... " and..."


The Out Campaign: Scarlet Letter of Atheism
free debate