Post Reply 
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:

 
   001 { 42 21 11 } f LBL A
   002 {        2 } 2
   003 { 44 40  1 } STO + 1
   004 {    45  1 } RCL 1
   005 {       15 } 1/x
   006 {    43 11 } g x^2
   007 {       16 } CHS
   008 {        1 } 1
   009 {       40 } +
   010 { 44 20  2 } STO * 2
   011 {    22 11 } GTO A

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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Stoneham's series - ttw - 06-04-2024, 01:31 PM
RE: Stoneham's series - KeithB - 06-04-2024, 02:20 PM
RE: Stoneham's series - Nigel (UK) - 06-04-2024, 03:37 PM
RE: Stoneham's series - Thomas Klemm - 06-04-2024, 03:34 PM
RE: Stoneham's series - Thomas Klemm - 06-04-2024, 07:57 PM
RE: Stoneham's series - Albert Chan - 06-04-2024, 08:44 PM
RE: Stoneham's series - Thomas Klemm - 06-05-2024, 04:20 AM
RE: Stoneham's series - Johnh - 06-07-2024 07:55 PM
RE: Stoneham's series - Albert Chan - 06-07-2024, 08:54 PM
RE: Stoneham's series - Johnh - 06-08-2024, 03:07 AM
RE: Stoneham's series - Johnh - 06-08-2024, 05:02 AM
RE: Stoneham's series - Albert Chan - 06-08-2024, 05:16 PM
RE: Stoneham's series - Gerson W. Barbosa - 06-09-2024, 10:36 PM
RE: Stoneham's series - Albert Chan - 06-11-2024, 05:12 PM
RE: Stoneham's series - Gerson W. Barbosa - 06-12-2024, 07:01 PM
RE: Stoneham's series - Gerson W. Barbosa - 06-14-2024, 05:42 PM
RE: Stoneham's series - Gerson W. Barbosa - 06-18-2024, 05:42 AM
RE: Stoneham's series - Namir - 06-09-2024, 10:55 PM
RE: Stoneham's series - Gerson W. Barbosa - 06-09-2024, 11:04 PM
RE: Stoneham's series - Gerson W. Barbosa - 06-11-2024, 02:31 AM



User(s) browsing this thread: 15 Guest(s)