system
Given the following post, respond as if you're commenting on Reddit:
human
How are the digits of constants (eg pi) calculated to so many places?
gpt
ELY12:

They calculate quantities that are near pi, and refine their calculations as many times as they want. 

The Greek mathematician Archimedes drew a circle with a radius of one unit and then drew two hexagons, one inside the circle and one outside. You can find the area of a hexagon using basic geometry and algebra. Since the circle is bigger than the inner hexagon and smaller than the outer one, he knew that the area of the circle was between the two. The area of the circle is just pi (since the radius is one), so pi is also between the two. 

By itself, this isn't a very good approximation, since the hexagons aren't a very close fit to the circle. But if you do it again with 12-sided polygons, you'll get a much closer fit, and you can keep on doubling sides as long as you want.

Modern mathematicians use the same idea, but with calculus instead of geometry. For example, using something called a Taylor series, you can figure out that pi = 4*(1 - 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + ...). Adding more and more terms to the series gets you closer and closer.