![]() ![]() Victor Adamchik and Stan Wagon, “A simple formula for pi”, Amer. Pi can be estimated using many methods, including complex formulas such as Leibnizs formula. “On the rapid computation of various polylogarithmic constants”, Math. “Finding the N-th digit of Pi.” Math Fun Facts.ĭavid Bailey, Peter Borwein, and Simon Plouffe. For more detailed explanations for some of these calculations, see Approximations of. However, the Adamchik-Wagon reference shows how similar relations can be discovered in a way that the proof accompanies the discovery, and gives a 3-term formula for a base 4 analogue of the BBP result. The BBP formula was discovered using the PSLQ Integer Relation Algorithm. More details can be found in the Bailey-Borwein-Plouffe reference. The number obtained is approximately 3.14, but. This yields the hexadecimal expansion of Pi starting at the (N+1)-th digit. Pi is a mathematical constant which, for any circle, is calculated by dividing the perimeter by the diameter. The other sums in the BBP formula are handled similarly. 0 / n Now the numbers will be like this: PI 3.14159 4 652591 PI 3.141592653590 The second difference is (2 / n3) or (2 / ( n n n )). Not many more than N terms of this sum need be evaluated, since the numerator decreases very quickly as k gets large so that terms become negligible. Division by (8k+1) is straightforward via floating point arithmetic. ![]() The numerator of a given term in this sum is 16 N-k, and it can be evaluated very easily mod (8k+1) using a binary algorithm for exponentiation. We are interested in the fractional part of this expression. For simplicity, consider just the first of the sums in the expression, and multiply this by 16 N. Here's a sketch of how the BBP formula can be used to find the N-th hexadecimal digit of Pi. It will optionally write this output to a text file. You might start off by asking students how they might calculate the 100-th digit of pi using one of the other! pi formulas they have learned. QuickPI is a Windows only command line tool that will generate pi to arbitrary length up to 256 million decimal places. This is far better than previous algorithms for finding the N-th digit of Pi, which required keeping track of all the previous digits!! Moreover, one can even do the calculation in a time that is essentially linear in N, with memory requirements only logarithmic in N. The reason this pi formula is so interesting is because it can be used to calculate the N-th digit of Pi (in base 16) without having to calculate all of the previous digits!! Here is a very interesting formula for pi, discovered by David Bailey, Peter Borwein, and Simon Plouffe in 1995: ![]()
0 Comments
Leave a Reply. |