I was trying various methods to implement a program that gives the digits of pi sequentially. 我正在嘗試各類方法來實現一個順序給出pi數字的程序。 I tried the Taylor series method, but it proved to converge extremely slowly (when I compared my result with the online values after some time). 我嘗試了泰勒系列方法,但事實證實它收斂得很是慢(當我在一段時間後將個人結果與在線值進行比較時)。 Anyway, I am trying better algorithms. 不管如何,我正在嘗試更好的算法。 git
So, while writing the program I got stuck on a problem, as with all algorithms: How do I know that the n
digits that I've calculated are accurate? 所以,在編寫程序時,我遇到了問題,就像全部算法同樣:我怎麼知道我計算的n
位數是準確的? 算法