Formula of Bailey, Borwein and Plouffe


The Formula of Bailey, Borwein and Plouffe, or BBP algorithm is an algorithm that can calculate any binary or hexadecimal position of the pi (math) number. The algorithm was discovered by Simon Plouffe in 1995 and is named after the authors of the publication in which the formula was first described, David Bailey, Peter Borwein and Simon Plouffe.

The formula prints π as infinite series: π = ∑ k = 0 & # x221E; 1 16 k ( 4 8 k + 1 & # x2212; 2 8 k + 4 & # x2212; 1 8 k + 5 & # x2212; 1 8 k + 6 ) {\displaystyle \pi =\sum _{k=0}^{\infty }{\frac {1}{16^{k}}}\left({\frac {4}{8k+1}}-{\frac {2}{8k+4}}-{\frac {1}{8k+5}}-{\frac {1}{8k+6}}\right)}

This formula allows you to simply calculate the nth binary or hexadecimal position of π without first calculating all previous positions. Bailey's website contains both distractions and implementations in different programming languages. Externe link

wiki