Many years ago I created a small silverlight “applet” that was able to calculate Pi based on some famous expansions.
With continued fractions it is also possible to arrive at the value of Pi, but the expansions that converge the fastest are the ones
discovered by Srinivasa Ramanujan. The wikipedia page on Pi expansions talks about them here.
The only problem is…Srinivasa’s expansion converges so fast that after 2 iterations the accuracy of
javascript’s number type is already exhausted. Great work, Sir!