The Computation of Pi by Archimedes

Archimedes wrote 3 1/7 > pi > 3 10/71. This is how he did it.
Updated 4 Mar 2016

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Before there was floating point, or a way to write zero, or algebraic notation, Archimedes bounded the value of pi by estimating the perimeter of regular polygons inside and outside the circle. His computation is repeated and explained here using MATLAB.

Cite As

Bill McKeeman (2024). The Computation of Pi by Archimedes (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!



Version Published Release Notes

Fixing bug noted by danf in comments.
Added a live script
Added a live script

Added @vpi and @fr class directories

The submitted zip file still did not have the right contents. Trying again.

Previous version did not have vpi or fr on the MATLAB path -- caused errors.

Still trying to change typo in Greek number

Fixed type in Greek integer

Apologies for many updates. Wordsmithing again.

Minor fixes, sent wrong file last submission.

Improved wording.

Rewrote some of the descriptive material.

Typo in title page