Yet another π formula
|
01-07-2021, 09:56 PM
(This post was last modified: 01-09-2021 08:35 PM by Albert Chan.)
Post: #11
|
|||
|
|||
RE: Yet another π formula
(01-07-2021 12:57 PM)Gerson W. Barbosa Wrote: Great! The continued fraction part is left unproved, however. But that would not be easy, I presume. "Wasicki's formula" had first term converge to pi, correction converge to 0. QED As to the gain of 25/12 digits per term, it tested OK even with 10,000 digits precision. Code: def test_pi(n, cf=0, c=0, s=0): >>> from gmpy2 import * >>> get_context().precision = 34000 # > 10000 dec. digits >>> pi = const_pi() >>> >>> for n in range(1000,4001,1000): print n, format(pi - test_pi(n), 'g') ... 1000 2.19966e-2091 2000 2.92237e-4181 3000 3.88382e-6271 4000 5.16203e-8361 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)