You are using the new UI (Beta).Return to the original UI

This page has been automatically translated by machine translation. Please note that translations may not be entirely accurate.

keisanHigh-precision calculations for everyday life and work

Calculating Pi (Inscribed and Circumscribed Polygons)

Manage Bookmarks
Calculates pi (π) from the perimeters of regular polygons inscribed in and circumscribed around a circle of diameter 1.
Initial values for the polygon
Number of loops: n
Calculates up to a 2(3) ×2n-sided polygon
The calculation ends when the values of the inscribed and circumscribed sides become equal. Increasing the number of digits used in calculations improves the precision of π.

From ancient times up until around the 17th century, approximations of pi were derived from polygons inscribed in and circumscribed around a circle.
Starting from the initial 4-sided polygon and 6-sided polygon, the algorithm calculates polygons with successively doubled numbers of sides (×2^n).

Recursive Algorithm
a: Perimeter of the circumscribed polygon, b: Perimeter of the inscribed polygon

\(\normalsize (1)\ a_0=\left\{{\large{4\atop 2\sqrt{3}}}\right.\ ,\hspace{20px}b_0=\left\{{\large{2\sqrt{2}\hspace{20px}:square\atop\hspace{20px} 3\hspace{30px}:hexagon}}\right.\\ (2)\ a_{n+1}={\large\frac{2a_n b_n}{a_n+b_n}}\ ,\hspace{20px}b_{n+1}=\sqrt{a_{n+1}b_n}\\ (3)\ b_n\lt\ \pi\ \lt a_n\\ \)

No customer feedback for this calculation yet.

Calculating Pi (Inscribed and Circumscribed Polygons) | Keisan