Pi

March 14th, 2017

\[ \pi = 0+\cfrac{4}{1+\cfrac{1^2}{3+\cfrac{2^2}{5+\cfrac{3^3}{7+\cfrac{4^2}{9+\cfrac{5^2}{\ddots\cfrac{}{2n-1+\cfrac{n^2}{\ddots}}}}}}}} \]

Happy \(\pi\) day! This uses my continued fraction library to compute digits of \(\pi\). This continued fraction representation is due to John Wallis, with his famous Wallis product formula for \(\pi\). (I actually cheated, and used the much faster converging simple continued fraction for the numerical value at the bottom, but it's just not as pretty.)