TOPICS

# Digit-Extraction Algorithm

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 (2022) gives a particularly simple digit-extraction algorithm for the decimal digits of by defining

 (1)

Then the th digit to the right of the decimal point of for is given by

 (2)

where is the integer part and is the fractional part. Similar formulas can be obtained using

 (3)

and

 (4)

where is an Euler number, which gives a base-9 (or binary) digit extraction formula (Plouffe 2022). Similar results can be also obtained for , , , , , and (Plouffe 2022).

BBP Formula, Pi Digits, Pi Formulas

## Explore with Wolfram|Alpha

More things to try:

## References

Plouffe, S. "A Formula for the 'th Decimal Digit or Binary of and ." https://arxiv.org/abs/2201.12601. 29 Jan 2022.

## Referenced on Wolfram|Alpha

Digit-Extraction Algorithm

## Cite this as:

Weisstein, Eric W. "Digit-Extraction Algorithm." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/Digit-ExtractionAlgorithm.html