If you draw a circle with a pencil, then the length of the pencil line is called perimeter, and the distance across the circle is called diameter. The perimeter and diameter are shown in the drawing above. Use the green handle to change the size of the circle. (The length measurements are given in pixels. The actual length depends on the size of your screen).

A surprising fact about circles, is that if you divide the perimeter by the diameter you will always get the same number, approximately 3.14159265! This is true for any circle, large or small. Since this number was recognized as an important one, it got its own name: or Pi.

What's that got to do with computer science?

Pi is so important, that it plays a role in every domain of science and engineering. For example, every time your computer draws something circular, like a pie-chart, be sure it uses Pi somehow on the way.

Also, Pi is an irrational number. This means we can never write it accurately in the form 3.14159, because the row of digits goes on and on forever. Mathematicians have always been curious to find as many of those digits as possible, even though they know they can never discover them all. Using computers and clever algorithms, mathematicians have discovered the first 5 trillions digits of Pi.

See also