Stoneham's series
|
06-18-2024, 05:42 AM
(This post was last modified: 06-18-2024 05:49 AM by Gerson W. Barbosa.)
Post: #20
|
|||
|
|||
RE: Stoneham's series
(06-14-2024 05:42 PM)Gerson W. Barbosa Wrote: P. P. S.: Stack-only, k≥2: I've finally found the correction factor for the Vieta's formula for \(\pi\) I was looking for, which turns the previous programs obsolete. The correction factor is \(c = 1 + \frac {1}{\frac{96}{\pi^2 }4^\left(n-1\right)}\) This simplifies to \(c = 1 + \frac {\pi^2\times 2^\left(-2n-3\right)}{3}\) where n is the number of iterations and \(\pi\) is the approximated value obtained at loop exit The program uses a more compact version of the latter for size-optimization. Code:
32 XEQ "VWπ" -> Y: 3.141592653589793238462607815493113 X: 3.141592653589793238462643383279503 Notice that from 22 correct decimal digits the correction factor gets another eleven, a 50 % increase in this case. On the HP-42S: 1 XEQ "VWπ" -> Y: 2.82842712475 X: 3.06412938514 2 XEQ "VWπ" -> Y: 3.06146745894 X: 3.13619104715 3 XEQ "VWπ" -> Y: 3.12144515227 X: 3.14124564095 4 XEQ "VWπ" -> Y: 3.13654849054 X: 3.14157081551 5 XEQ "VWπ" -> Y: 3.14033115695 X: 3.14159128636 9 XEQ "VWπ" -> Y: 3.14158772526 X: 3.14159265356 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 13 Guest(s)