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.
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
3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034
82534211706798214808651328230664709384460955058223172535940812848111745028410270193852110
55596446229489549303819644288109756659334461284756482337867831652712019091456485669234603
48610454326648213393607260249141273724587006606315588174881520920962829254091715364367892
59036001133053054882046652138414695194151160943305727036575959195309218611738193261179310
51185480744623799627495673518857527248912279381830119491298336733624406566430860213949463
95224737190702179860943702770539217176293176752384674818467669405132000568127145263560827
78577134275778960917363717872146844090122495343014654958537105079227968925892354201995611
21290219608640344181598136297747713099605187072113499999983729780499510597317328160963185
95024459455346908302642522308253344685035261931188171010003137838752886587533208381420617
17766914730359825349042875546873115956286388235378759375195778185778053217122680661300192
78766111959092164201989
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.