Applet Pie

Calculator

The number Pi, accurate to 16 places is;

3.1415926535 897932

There are about a zillion different ways to calculate Pi, but my favorite is an infinite series called Gregory's series, namely;

pi/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9...

I like it because it doesn't use any trig functions and is easy to program.  It also takes forever to converge.  If you extend the formula out to 1,000 terms, Pi is accurate to about 2 places, 10,000 iterations gets you close to 4 decimal points of accuracy, and 100,000 will get 5 decimal places.

Enter a number and watch it work.  If you have a fast computer start with at least 10,000 or so iterations.  It's an entertaining (albeit useless) way to witness your CPU in action as it crunches away, getting closer and closer to Pi...

Now if you are amused by this, then;

1)  You are easily amused

2)  You'll probably like this (it's actually useful!)

 

 

 

 

 

 

 

 

 Contact me at John@JohnMcBride.com

Home ] Calculator ]

Copyright © 1996-07 JohnMcBride.com All rights reserved.