Ben Langhinrichs

September, 2014
SMTWTFS
 01 02 03 04 05 06
07 08 09 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

Search the weblog





























Genii Weblog

Happy Pi Day!

Wed 14 Mar 2007, 10:41 PM



by Ben Langhinrichs

Pies, Pies, Pies by Wayne Thiebaud

For those who don't know, today is Pi Day (or π Day for those who like their symbols), so named because it is 3/14 (at least here in the U.S.), which neatly corresponds to 3.14, the first few digits of pi.  The traditional way to celebrate is by having some pie, the yummy kind.  We had Dutch Apple and Key Lime pies in my house.

Incidentally, when I was about thirteen, I memorized the first 26 digits of pi.  Let's see if I still remember:  3.14159265358979323844626433....  I don't have time to check right now, but that sounds about right.

Copyright © 2007 Genii Software Ltd.

What has been said:


583.1. Ian Randall
(03/14/2007 08:32 PM)

Not a bad memory Ben,

Check out your calculation to 4 million decimal places.

Ian


583.2. Ben Langhinrichs
(03/15/2007 04:43 AM)

Ian - Thanks. Glad to see that some part of my mind has not decayed into nonrecognition yet. As for the 4 million places, I'm glad I can look them up and don't need to try to memorize those.


583.3. Mika Heinonen
(03/15/2007 10:23 AM)

I see often that people make PI as a constant in their programs. I think a better solution is to use the computer's maximum floating point accuracy and use simply: double PI = 4*Atn(1)

Atn() stands for Arcus Tangens in Radial mode, also seen often as atan() or arctan().

Most compilers have PI already declared, and usually it's defined also using the maximum precision.


583.4. Andre Guirard
(03/19/2007 10:07 AM)

Here's an easy way to remember to 31 digits.