University of Birmingham crest

University of Birmingham


Root(2) and PI computations


Check  out my Square Root 2 applet which uses the Bhaskara-Brouckner algorithm to compute root(2) to any number of decimal places. This is about the fastest algorithm I have found to do this computation. I have checked this algorithm for the first million or so decimal places by comparing it with those posted at The NASA Goddard Flight Centre  web-site (err not by hand. I wrote a program to do it!). The algorithm makes extensive use of Java's BigInteger class.

Also try out my  PI applet which uses the BPP formula (named after
Bailey-Borwein-Plouffe) to compute each hexadecimal digit of PI as a ratio of polynomials.  It is a simple matter to convert these to decimal digits. The applet is fairly slow and takes a couple of minutes for 10000 decimal places. I must admit I have only checked this for the first 10000 decimal places. Please email me if you find any errors. Again this uses Java's BigInteger class to do the donkey work.