The Museum of HP Calculators

HP Forum Archive 06

[ Return to Index | Top of Index ]

Pi Calculations
Message #1 Posted by Katie on 8 July 2001, 2:24 a.m.

Have any of you written programs to calculate many digits of Pi on HP calcs? I found a very slow program for the 67 from way back when and another for the 28C/S. Is there a repository for such stuff? I just wrote one for the 32SII (it's posted in the articles area, FYI) and was wondering how it does in comparison to others.

-Katie

(Using the 48S/G, 49G and other serious memory machines --even the 41 and 42S -- is cheating!)

      
Re: Pi Calculations
Message #2 Posted by Steve (Australia) on 8 July 2001, 7:18 a.m.,
in response to message #1 by Katie

My favorite number :-)

Here's my program (from memory)

01 3.141592658979323846264338327950288419796939937511 02 END

Executes quite quickly too :-)

            
Re: Pi Calculations
Message #3 Posted by Ex-PPC Member on 9 July 2001, 5:37 a.m.,
in response to message #2 by Steve (Australia)

Hi,

Steve (Australia) wrote: > > Here's my program (from memory) > > 01 3.141592658979323846264338327950288419796939937511 02 > END

>Executes quite quickly too :-)

Your 'program' has a bug: it's not

3.1415926589793238 ...

but rather

3.14159265(35)89793238 ...

i.e: you missed the '35' shown in parentheses.

I discovered the bug by running my own memory program. Seems you need a debugger pretty fast :-)

                  
Re: Pi Calculations
Message #4 Posted by Ernie Malaga on 9 July 2001, 10:21 a.m.,
in response to message #3 by Ex-PPC Member

Aw, c'mon, give Steve a break. At least his program has merit for its brevity, although it seems a bit odd that it has no LBL. Makes CATALOG 1 the only way to access it...

-EM

                  
Re: Pi Calculations
Message #5 Posted by db(martinez,california) on 10 July 2001, 10:24 p.m.,
in response to message #3 by Ex-PPC Member

maybe pi is different south of the equator. or mabye steves memory is only good to 8 decimal places. mine is only good to 4 for pi but i can usually do 7 digits. makes it convenient to dial phone numbers in the u.s. - or my height in microfurlongs.

                        
Re: Pi Calculations
Message #6 Posted by Steve (Australia) on 11 July 2001, 1:09 a.m.,
in response to message #5 by db(martinez,california)

It's a memory thing. I can recite PI to 50 decimal places quite easily, however if I have to slow down to write it or to type it, I lose my rhythm and (as in this case) my place.

I also do several other constants, e, phi, sqrt(2) :-) None to 50 decimal places though. Oh, I also do log(2), and 1/sqrt(2). These are numbers I need to use quite often, so knowing them to between 4 and 15 decimal places does occasionally come in handy.

Mmmmmmmmmmmmm... Maths (I love that smell)

      
Re: Pi Calculations
Message #7 Posted by Gene on 8 July 2001, 7:50 a.m.,
in response to message #1 by Katie

The old PPC Journals, available from Jake Schwartz on CD, had a program that calculated PI to over 1000 digits on an HP-41. Ran really fast too. I think it also had a log fit of PI calculation times that showed programs for the HP-67, TI-58, TI-59, Sharp PC 1000, etc. and they all fit the curve, except for this HP41 program that was MUCH much faster!

Seems like it was in the 1980-1982 time frame in the journals.

            
Re: Pi Calculations
Message #8 Posted by Massimo (Italy) on 8 July 2001, 10:02 a.m.,
in response to message #7 by Gene

>The old PPC Journals, available from Jake Schwartz on CD, had a program that calculated PI to over 1000 digits on an HP-41. Ran really fast too.

>Seems like it was in the 1980-1982 time frame in the journals.

PPC Calculator Journal V7N5P9 (June 1980)

Timings (from article): 30 digits - 2 minutes, 90 digits - 9 minutes, 200 digits - 34 minutes, 1000 digits - 11.5 hours, 1160 digits - 15.25 hours

Just got yesterday my CDs from Jake... ;)


[ Return to Index | Top of Index ]

Go back to the main exhibit hall