Stoneham's series
|
06-07-2024, 07:55 PM
(This post was last modified: 06-07-2024 08:34 PM by Johnh.)
Post: #8
|
|||
|
|||
RE: Stoneham's series
I got interested in the infinite product for Pi, presented above:
Pi= 4 * Prod( 1-1/d^2) taken over all d>1, for d = odd numbers. So I made a small routine for an Hp15c: Code:
Put 1 into Memory 1 and 4 into Memory 2, and then run A Memory 1 starts at 1 and increments by 2 at each cycle, and Memory 2 starts with 4 and gets shaved gradually down towards Pi by multiplication with factors just slightly less than 1. It's not a very fast method to get close to Pi, so needs many loops. The routine as written above runs without pausing or stopping to display. But adding RCL 2 and PSE after line 10 will let the steps be observed. So I tried this on my Hp15C-CE and on two Android emulators on my Samsung S22, each set to run at max speed. Each ran for 60 seconds. The real Hp15C-CE, incremented d from 1 up to 12135 in steps of 2, and achieved a PI approximation of 3.14172210. Touch RPN, running in Hp15 mode incremented to 62631 and estimated Pi as 3.141617733 Jovial JRPN15 incremented to 2,664,645 and got to a Pi estimate of 3.141607465. Jovial wins the test, much faster, doing over 1.3 million loops in a minute!, though not much extra convergence is achieved with this formula, for all the extra cycles. Also, Jovial JRPN15 provided my code listing above as a direct copy to the Clipboard, which is a very handy feature, plus a copy-paste of its two number results. Touch RPN can also copy result numbers, and saves memory contents in a text format which has key codes, though not the key names in the current version and its not so easily accessible. But I prefer it for it's look and feel. Maybe more interesting than useful, but a good test of these three Hp15 versions. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)