Use the Leibniz formula to approximate the digits of Pi and graph the convergence.
In mathematics, the Leibniz formula for π, named after Gottfried Leibniz. It is also called the Madhava–Leibniz series as it is a special case of a more general series expansion for the inverse tangent function.
The series for the inverse tangent function, which is also known as Gregory's series is below. The Leibniz formula for π/4 can be obtained by putting x = 1 into this series.