Deep Pi - 42S - Some Results


The two HP-42S's are busy runing the deep pi program and printing their results. The following is the first 24 hours:

Note: FAST refers to Fast Speed, NORM refers to the standard speed. Also, I was using a HP-41CX to print the date and time every 10 minutes. I lost some time marks when my timer printing program didn't adjust for rolling over to a new day at midnight. So there's several hours where the 42S printed results, but I don't know the time frame. This is noted as NO-TIME in the list.

The times given are from the start time to the next ten minute time mark. Thus the actual time will be less that that indicate - up to a maximum of 10 minutes less.

Digit Fast Norm
1 10 Min 20 Min
7 20 Min 40 Min
13 40 Min 1 Hr 20 Min
19 1 Hr 0 Min No Time
25 1 Hr 30 Min No Time
31 No Time No Time
37 No Time No Time
43 No Time 7 Hr 20 Min
49 No Time 9 Hr 20 Min
55 No Time 11 Hr 40 Min
61 No Time 14 Hr 20 Min
67 8 Hr 10 Min 17 Hr 20 Min
73 9 Hr 50 Min 20 Hr 40 Min
79 11 Hr 40 Min 24 Hr 30 Min
85 13 Hr 40 Min 28 Hr 00 Min
91 15 Hr 50 Min
97 18 Hr 20 Min
103 21 Hr 0 Min
109 23 Hr 50 Min
115 27 Hr 00 Min
121 30 Hr 20 Min

It looks like it'll take a long time to reach the 1000th digit. Wonder if the batteries will hold out.

The Fast Mode is a little more than double the speed. At least with this program.


Perhaps I'm confused. (Wouldn't be the first time).

These times are awful. There was an HP41 program (that would work fine on the 42S) that found 1000 digits of PI in under 10 hours.

What am I missing here?




Hi Gene,

Well.... Hugh did say his program wasn't optimized :) I was mainly running it to see what dfference the fast mode made on the 42S in program execution and battery consumption.

Do you have copy of the HP-41 program? Did it just use standard 41 functions or did it make use of synthetic fuctions? If standard functions, then the 42S should execute it quicker.

Just re-read your posting and you do say it would run on the 42S. Could you post the program and I'll give it try. Thanks.


PPC V8N2P4 (March/April 1980)

A graph of PI calculation times is found in the above PPC Journal. The program was written by Ron Knapp. It was published before the graph date, but not sure when.

He later revised it.

1000 digits in 8 hours, I think.

Since the 42S in fast mode is about 4-8X faster than a vanilla 41c, that should be between 1-2 hours for 1000 digits.


It can be found on "that other site".


P.S. I know the other program might could compute digits 100-110 without doing the first 100 digits, but since Knapp's program can give you all 110 of those digits in much less time, it's more efficient.



I have the 42S Owner's Manual right in front of me. I don't see anything in the index about a fast mode. What am I missing?



Hi Trent,

Early versions of the HP-42S Rom could be programmed into a "Fast" mode by using the built-in debugger. See the following page:


The 42S rom was changed around late 1989 (?) and this no longer worked.

It uses battery power but makes games/programs a joy to run.

Old 42S calculators are worth more as a result.



I can confirm taht with Serial 3330S...

[VPN] )-`:


sorry, but a "size error" means you have one that does not work in fast mode.

I have never seen/heard of a 42S that was capable of fast mode with a SN after 3100sXXXX.

All of them are 1990 vintage or earlier.

Happy's worth it!


Thanks for information. My 42S must be one of the last to be made, serial 3515S...



One of the ones I have around here is an "ID027..." replacement unit.
I think those were among the the last to be built.



If I remeber well, the special thing about deep-pi was that it computes a bunch of decimals without computing the ones before them. I can imagine that it takes extra computing time to do so. The program you are referring to may be more "straight forweard" and computes decimals in order.

Hence, perhaps no real practical use for deep-pi, but that wasn't the point here.


Note - The times are the total time to that digit INCLUDING the time to calculate ALL the previous digits. So, 8 HR to Digit 67 also includes calculating and printing the previous digits up to 67. I don't think my original post was real clear on this.


hi guys,

thanks for posting your results. you're right, this is very bad indeed. 24 hours and only just a hundred digits or so. i was hoping we'd get to 1000 in that time. the algorithm is O(n^1.5) so this is bad news for more digits.

firstly, its unlikely that this or similar algorithm will beat the 8 hours for 1000 whatever it does. this is because the method is fundamentally slower than a straight fixed size calculation. i have a few ideas on how to speed up the current method, but it will be a *2 or so if im lucky. i think there is a more recent algorithm that has slightly better order, but its more complicated and may, in fact, be slower for these numbers. i'll look into it.

in the meantime, im most grateful that you've got these results as it gives an indication into whether this approach stands a change at all of being feasible (or not).

Possibly Related Threads...
Thread Author Replies Views Last Post
  [OT] Mathematica free for Raspberry PI BruceH 32 6,401 11-23-2013, 05:24 AM
Last Post: Nick_S
  Computing pi with the PC-1300S Kiyoshi Akima 0 874 11-17-2013, 12:24 AM
Last Post: Kiyoshi Akima
  hp prime - sending program results to the stack giancarlo 6 1,590 10-15-2013, 02:00 AM
Last Post: Giancarlo
  HP Prime complex results Javier Goizueta 0 783 10-06-2013, 12:59 PM
Last Post: Javier Goizueta
  HP Prime Solving Nonlinear System of Equations for Complex Results Helge Gabert 11 3,297 09-30-2013, 03:44 AM
Last Post: From Hong Kong
  Calculating Pi LHH 9 2,281 09-27-2013, 10:50 PM
Last Post: Gerson W. Barbosa
  Visualization of pi Bruce Bergman 13 2,924 08-17-2013, 05:00 PM
Last Post: Howard Owen
  OT: Happy Pi Day! Eddie W. Shore 13 2,824 03-22-2013, 10:44 AM
Last Post: Les Koller
  Totally OT ... Pi Day for my car Maximilian Hohmann 18 3,552 03-10-2013, 01:15 PM
Last Post: chris smith
  [WP34S] A funny bug in Pi (prod) Eduardo Duenez 3 1,137 01-28-2013, 03:41 AM
Last Post: Walter B

Forum Jump: