An algorithm which allows digits of a given number to be calculated without requiring the computation of earlier digits. The BBP formula for pi is the best-known such algorithm, but an algorithm also exists for e. Plouffe gives a particularly simple digit-extraction algorithm for the decimal digits of π by defining π_n = ((2(-1)^(n + 1)(2n)!)/(2^(2n) B_(2n)(1 - 2^(-n))(1 - 3^(-n))(1 - 5^(-n))(1 - 7^(-n))))^(1/(2n)). Then the nth digit to the right of the decimal point of π for n>=3 is given by d_n = int(10frac(10^(n - 1) π_(n - 1))) where int(x) is the integer part and frac(x) is the fractional part.
We guarantee you’ll find the right tutor, or we’ll cover the first hour of your lesson.