HP Forums

Full Version: Computing Pi decimals on HP 41; error in algorithm?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Years ago, there was a discussion on the old forum about computing Pi to many decimals using an HP 41 ( see http://www.hpmuseum.org/cgi-sys/cgiwrap/...read=72865 ).

My vintage 41 sees very little use, but I have an emulator running on a different machine and recently got a DM-41 which does a decent job, and tried to run that program.

The result I get for the claimed value of Pi is this:

register
01: 31415.92653
02: 58979.32384
03: 62643.38327
04: 89456.42639 <-- error
05: 38033.96091
(...)

The answer, according to published value of the number, should have been
01: 31415.92653
02: 58979.32384
03: 62643.38327
04: 95028.84197 <-- clearly different from that point onwards
05: 16939.93751
(...)

Notice how the 4th register reading is completely off?

I checked the published code (in the old forum) several times, and cannot find a fault in the way I entered it. Can anyone try it and check if the answer matched the real value, or the one I get? And if the later, how come it was never spotted before?
(09-30-2016 02:29 PM)Vincent G Wrote: [ -> ]Years ago, there was a discussion on the old forum about computing Pi to many decimals using an HP 41 ( see http://www.hpmuseum.org/cgi-sys/cgiwrap/...read=72865 ).
(...)
Notice how the 4th register reading is completely off?

I checked the published code (in the old forum) several times, and cannot find a fault in the way I entered it. Can anyone try it and check if the answer matched the real value, or the one I get? And if the later, how come it was never spotted before?

FTR: I copied the listing from the old forum's post and converted it into a raw file which then was used in V41. In Turbo mode the program finished quickly, and here is the result: Yes, it's the same as yours. R01..03 are fine, then the result is off.

Dieter
Reference URL's