A digit-extraction algorithm allows digits of a given number to be calculated without requiring the computation of earlier digits. The BBP formula permits individual hexadecimal digits or binary digits of pi to be calculated in this way (Bailey et al. 1997).
Plouffe (2022) proposes a formula for decimal digits of by defining
|
(1)
|
where
is a positive integer and
is a Bernoulli number.
A candidate for the
th digit to the right of the decimal
point of
for
is
|
(2)
|
where
is the integer part and
is the fractional part.
To certify the digit, an error bound must exclude crossing
a decimal truncation boundary. A small absolute error
alone does not guarantee this. Similar approximations can be obtained using
|
(3)
|
and
|
(4)
|
where
is an Euler number (Plouffe 2022). Plouffe uses the
first approximation for octal (base
8) digits and the second for decimal
digits, subject to the same truncation-boundary requirement. Related limits
and formulas can also be obtained for
(Plouffe 2022).