Iris
Current estimate 3.000000
True π 3.141592653589793
Error 0.141593
Samples 0
Method
Speed

What’s happening

Each method exploits a different relationship between π and geometry or algebra:

  • Monte Carlo: Throw random points into a unit square. The fraction landing inside the inscribed quarter-circle estimates π/4. Convergence: O(1/√n).
  • Buffon’s needle: Drop needles of length L onto parallel lines spaced D apart. The probability of crossing a line is 2L/(πD). Count crossings, solve for π.
  • Leibniz series: π/4 = 1 − 1/3 + 1/5 − 1/7 + … Beautifully simple, agonizingly slow. Each partial sum oscillates around the true value.
  • Polygon approximation: Archimedes’ method: compute the perimeters of regular n-gons inscribed in and circumscribed about a unit circle. As n doubles, both bounds converge to π. He used 96-gons to get 3.1408 < π < 3.1429.

The error graph on the right shows convergence rate. Monte Carlo and Buffon converge as 1/√n (slow). Leibniz converges as 1/n (not much better). Archimedes’ polygon method converges exponentially — each doubling of sides roughly doubles the number of correct digits.

← back to lab index