# Bellard's formula

Bellard's formula, as used by PiHex, the now-completed distributed computing project, is used to calculate the nth digit of π in base 16. It is a faster version (about 43% faster[1]) of the Bailey–Borwein–Plouffe formula.

Bellard's formula was discovered by Fabrice Bellard in 1997.

One important application is verifying computations of all digits of pi performed by other means. Rather than having to compute all of the digits twice by two separate algorithms to ensure that a computation is correct, the final digits of a very long all-digits computation can be verified by the much faster Bellard's formula.[2]

## Formula

{\displaystyle {\begin{aligned}\pi ={\frac {1}{2^{6}}}\sum _{n=0}^{\infty }{\frac {(-1)^{n}}{2^{10n}}}\,\left(-{\frac {2^{5}}{4n+1}}\right.&{}-{\frac {1}{4n+3}}+{\frac {2^{8}}{10n+1}}-{\frac {2^{6}}{10n+3}}\left.{}-{\frac {2^{2}}{10n+5}}-{\frac {2^{2}}{10n+7}}+{\frac {1}{10n+9}}\right)\end{aligned}}}

## Notes

1. ^ "PiHex Credits". Centre for Experimental and Constructive Mathematics. Simon Fraser University. March 21, 1999. Archived from the original on 2017-06-10. Retrieved 30 March 2018.
2. ^ Trueb, Peter (31 October 2016). "Hexadecimal Digits are Correct!". Archived from the original on 2016-11-16. Retrieved 2016-12-28.