我可以提供给您几个计算公式:
1. By Leibniz
Pi = 4(1- 1/3 + 1/5 - 1/7 + 1/9 ...)
2. By Euler
Pi = 4( 1/2 - 1/(3*2^3) + 1/(5*2^5) - 1/(7*2^7) ... )
3. By Herdon
Pi = 12 * arctan(1/4) + 4 * arctan(5/99)
4. By Martin
Pi = 16 * arctan(1/5) - 4 * arctan(1/239)
5. By BrownCouro
4/Pi = 1 + 1/(2+ 9/(2+25/(2+49/(2+81/....... 连分数展开式
6. By Newton
Pi = 6(1/2 + 1/(2*3*2^3) + (1*3)/(2*4*5*2^5) + (1*3*5)/(2*4*6*7*2^7) + ... )
7. By Wallis
Pi = 2*(2/1)*(2/3)*(4/3)*(4/5)*(6/5*(6/7*(8/7)*(8/9)*...
...
其中, 连分数的公式收敛极快, 但是不易用程序计算
Euler, Martin, Newton 的公式收敛快. 现代计算机求Pi多用
Euler的公式(编程简单, 误差容易估计)