Pi Day

Pi Day is celebrated on March 14th (3/14) around the world. Pi (Greek letter “π”) is the symbol used in mathematics to represent a constant — the ratio of the circumference of a circle to its diameter — which is approximately 3.14159.

Pi Day

The irrational number Pi has been calculated to over one trillion digits beyond its decimal point. In addition, as an irrational and transcendental number, it will continue infinitely without repetition or pattern. Only a handful of digits are needed for typical calculations, however, Pi’s infinite nature makes it a fun challenge to memorize, and to computationally calculate more and more digits.

Pi to a 1000 digits


Calculate Pi (using the Nilakantha series) and Python

P = 3
MC = 1
C = 1
for MC in range(1,50000):
P = P + (4/((C+1)*(C+2)*(C+3)) – 4/((C+3)*(C+4)*(C+5)))
PI = ‘%10.60f’%(P)
print (PI)
C = C + 4

You will need run this code billions of iterations to begin to approach calculating Pi. Of course, that is why Pi is so fun!

Go here to run the program code. Just click the green run button.

Note: 22/7 is NOT Pi

By measuring circular objects, it has always turned out that a circle is a little more than 3 times its width around. In the Old Testament of the Bible (1 Kings 7:23), a circular pool is referred to as being 30 cubits around, and 10 cubits across. The mathematician Archimedes used polygons with many sides to approximate circles and determined that Pi was approximately 22/7. The symbol (Greek letter π) was first used in 1706 by William Jones. A ‘p’ was chosen for ‘perimeter’ of circles, and the use of π became popular after it was adopted by the Swiss mathematician Leonhard Euler in 1737. In recent years, Pi has been calculated to over one trillion digits past its decimal. Only 39 digits past the decimal are needed to accurately calculate the spherical volume of our entire universe, but because of Pi’s infinite & pattern less nature, it’s a fun challenge to memorize, and to computationally calculate more and more digits.

Print Friendly, PDF & Email