# 贝利-波尔温-普劳夫公式

${\displaystyle \pi =\sum _{k=0}^{\infty }\left[{\frac {1}{16^{k}}}\left({\frac {4}{8k+1}}-{\frac {2}{8k+4}}-{\frac {1}{8k+5}}-{\frac {1}{8k+6}}\right)\right]}$

${\displaystyle \alpha =\sum _{k=0}^{\infty }\left[{\frac {1}{b^{k}}}{\frac {p(k)}{q(k)}}\right]}$

## 特例

${\displaystyle P(s,b,m,A)=\sum _{k=0}^{\infty }\left[{\frac {1}{b^{k}}}\sum _{j=1}^{m}{\frac {a_{j}}{(mk+j)^{s}}}\right]}$

### 已知的BBP式

{\displaystyle {\begin{aligned}\ln {\frac {9}{10}}&=-{\frac {1}{10}}-{\frac {1}{200}}-{\frac {1}{3\ 000}}-{\frac {1}{40\ 000}}-{\frac {1}{500\ 000}}-\cdots \\&=-\sum _{k=1}^{\infty }{\frac {1}{10^{k}\cdot k}}=-{\frac {1}{10}}\sum _{k=0}^{\infty }\left[{\frac {1}{10^{k}}}\left({\frac {1}{k+1}}\right)\right]\\&=-{\frac {1}{10}}P\left(1,10,1,(1)\right)\end{aligned}}}
{\displaystyle {\begin{aligned}\ln 2&={\frac {1}{2}}+{\frac {1}{2\cdot 2^{2}}}+{\frac {1}{3\cdot 2^{3}}}+{\frac {1}{4\cdot 2^{4}}}+{\frac {1}{5\cdot 2^{5}}}+\cdots \\&=\sum _{k=1}^{\infty }{\frac {1}{2^{k}\cdot k}}={\frac {1}{2}}\sum _{k=0}^{\infty }\left[{\frac {1}{2^{k}}}\left({\frac {1}{k+1}}\right)\right]\\&={\frac {1}{2}}P\left(1,2,1,(1)\right)\end{aligned}}}

{\displaystyle {\begin{aligned}\arctan {\frac {1}{b}}&={\frac {1}{b}}-{\frac {1}{b^{3}3}}+{\frac {1}{b^{5}5}}-{\frac {1}{b^{7}7}}+{\frac {1}{b^{9}9}}+\cdots \\&=\sum _{k=1}^{\infty }\left[{\frac {1}{b^{k}}}{\frac {\sin {\frac {k\pi }{2}}}{k}}\right]={\frac {1}{b}}\sum _{k=0}^{\infty }\left[{\frac {1}{b^{4k}}}\left({\frac {1}{4k+1}}+{\frac {-1}{4k+3}}\right)\right]\\&={\frac {1}{b}}P\left(1,b^{4},4,(1,0,-1,0)\right)\end{aligned}}}

### π的BBP公式

{\displaystyle {\begin{aligned}\pi &=\sum _{k=0}^{\infty }\left[{\frac {1}{16^{k}}}\left({\frac {4}{8k+1}}-{\frac {2}{8k+4}}-{\frac {1}{8k+5}}-{\frac {1}{8k+6}}\right)\right]\\&=P\left(1,16,8,(4,0,0,-2,-1,-1,0,0)\right)\end{aligned}}}

${\displaystyle \pi =\sum _{k=0}^{\infty }\left[{\frac {1}{16^{k}}}\left({\frac {120k^{2}+151k+47}{512k^{4}+1024k^{3}+712k^{2}+194k+15}}\right)\right]}$

#### π的BBP位抽取算法

${\displaystyle \pi =4\sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+1)}}-2\sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+4)}}-\sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+5)}}-\sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+6)}}}$

${\displaystyle \sum _{k=0}^{\infty }{\frac {1}{(16^{k})(8k+1)}}=\sum _{k=0}^{n}{\frac {1}{(16^{k})(8k+1)}}+\sum _{k=n+1}^{\infty }{\frac {1}{(16^{k})(8k+1)}}}$

${\displaystyle \sum _{k=0}^{\infty }{\frac {16^{n-k}}{8k+1}}=\sum _{k=0}^{n}{\frac {16^{n-k}}{8k+1}}+\sum _{k=n+1}^{\infty }{\frac {16^{n-k}}{8k+1}}}$

${\displaystyle \sum _{k=0}^{n}{\frac {16^{n-k}\mod 8k+1}{8k+1}}+\sum _{k=n+1}^{\infty }{\frac {16^{n-k}}{8k+1}}}$

${\displaystyle 4\Sigma _{1}-2\Sigma _{2}-\Sigma _{3}-\Sigma _{4}.\,\!}$

## 推广

D.J.布拉德赫斯特提出了一种BBP算法的泛化形式。[10]这种形式可以用于在接近线性时间和对数空间下求很多其他的常数。例如卡塔兰常数${\displaystyle \pi ^{3}}$ ${\displaystyle \log ^{3}2}$ 阿培裏常数${\displaystyle \zeta (3)}$ （其中${\displaystyle \zeta (x)}$ 黎曼ζ函數），${\displaystyle \pi ^{4}}$ ${\displaystyle \log ^{4}2}$ ${\displaystyle \log ^{5}2}$ ${\displaystyle \zeta (5)}$ ，还有很多${\displaystyle \pi }$ ${\displaystyle \log 2}$ 的不同幂次。这些结果主要是使用多重对数函数polylogarithm ladder）得到的。

## 参考资料

1. ^ Bailey, David H., , and Plouffe, Simon. On the Rapid Computation of Various Polylogarithmic Constants. Mathematics of Computation. April 1997, 66 (218): 903–913. doi:10.1090/S0025-5718-97-00856-9.
2. ^ Controversy surrounding who among the three actually invented this algorithm. [2010-04-25]. （原始内容存档于2010-04-17）.
3. ^
4. ^ ANALYSIS OF PSLQ. [2011-11-21]. （原始内容存档于2016-03-04）.
5. ^ The Quest for Pi (PDF). [2010-04-25]. （原始内容 (PDF)存档于2011-09-27）.
6. ^ A C++ implementation of the BBP algorithm for π（portable, SSE2 and OpenMP versions）. [2010-04-25]. （原始内容存档于2010-11-27）.
7. ^ (Python)| A Python implementation of the BBP algorithm for π. [2010-04-25]. （原始内容存档于2016-03-04）.
8. ^ A Ruby implementation of the BBP algorithm for π. [2018-04-24]. （原始内容存档于2008-06-08）.
9. ^ Computing π on a distributed cluster of computers. [2010-04-25]. （原始内容存档于2010-02-05）.
10. ^ D.J. Broadhurst, "Polylogarithmic ladders, hypergeometric series and the ten millionth digits of ζ(3) and ζ(5)页面存档备份，存于互联网档案馆）", (1998) arXiv math.CA/9803067