Link Search Menu Expand Document

Approximation of π

For the given number of iterations n calculate approximation of π using the Leibniz formula

Note that Leibniz’s formula converges extremely slowly, so you’ll need a lot of iterations. How many iterations till you get the 5th decimal point correctly?

* Side quest: Watch a video on Newton’s formula for π: https://www.youtube.com/watch?v=gMlf1ELvRzc

** Bonus Points: Try out other formulas for π approximation