The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

hp33s and factorial timing
Message #1 Posted by Marcel Pelletier on 28 July 2004, 9:13 p.m.

On my hp33s (CNA41507077), 200! is very very fast but 100! is a bit slower. Why?

      
Re: hp33s and factorial timing
Message #2 Posted by martin cohen on 28 July 2004, 9:22 p.m.,
in response to message #1 by Marcel Pelletier

Interesting!

Playing around a bit, 159! is fast, and 158! is slow.

157! is slow, 157.1! is fast.

My guess is that for integers 158 or less, a multiplication loop is done; for other values, some variation on Stirling's formula is used.

They could have started at 20 or so instead of 158. I do not know why this particular value was chosen.

            
Re: hp33s and factorial timing
Message #3 Posted by bill platt on 29 July 2004, 9:51 a.m.,
in response to message #2 by martin cohen

On the original 32s, it seems that the x! is slower and slower all the way up to the overfolw limit. The Gamma function (non-integer factorial), however, is siginificantly faster---detection of the speed difference being above a threshold of around 50!

Bill

                  
Re: hp33s and factorial timing
Message #4 Posted by martin cohen on 29 July 2004, 7:20 p.m.,
in response to message #3 by bill platt

As seems evident from many of the 33s discussions, the 33s was not just a port of the 32sii but a complete rewrite. I eagerly await the 33s+ with the following:

Bug fixes.

More variables and labels (i up to 10000, multi-character labels and variables).

More readable decimal point.

(The above are the essentials; the ones below are optional)

Ability to turn off thousand's separator.

Matrix operations.

Bit fiddling (and, or, ...).

42s type graphics.

Optional bigger stack.

World peace.

                        
Re: hp33s improvements
Message #5 Posted by bill platt on 29 July 2004, 7:34 p.m.,
in response to message #4 by martin cohen

Hi Martin

I would add "editability of equations" to the must have part. If it had that, then the machine would be capable of functioning like the "formula entry" machines out there--giving it a tri-functionality: RPN, old-time ALG-postfix, and Formula. To put the "answer int oa chain of formulas, I suppose you would merely send the evaluation into a variable, and use the variable in the next chain---but an "ans" button could be used, too (like, who needs the cube root feature-replace it!).

I would also change the equation writing system to eliminate the existence of the "unary minus." I find that to be an annoying business--different from machine to machine. (Much worse on the 32sii BTW because it is evaluated before y^x in most but not all circumstances!). The 17bii has no unary minus, and evaluates each minus sign to "reverse" the sign one by one, in other words, you can have 4*---7 in the equation list, and it will evaluate to -28. If you do the same on a 48GX, in 'algebraic' it will parse it to '4*-7' when it is entered to the stack. b If you try '4-*7' it will catch the error during the parsing, and tell you to fix it. These sorts of behaviors make more sense to me.

Regards,

Bill

                              
Re: hp33s improvements
Message #6 Posted by Steve A on 30 July 2004, 5:06 a.m.,
in response to message #5 by bill platt

I'd make a change to the keypad.

Now that I've used the 33s for a few weeks, I find no general problems with the chevron layout. I'm barely even aware of it.

*Except* for the four way 'cursor' key, and the four function keys next to it.

Left and right are OK, and down is very good, but I often don't get the 'Up' properly.

I also find those mode/eng etc. keys a bit fiddly, but perhaps my thumb is too fat ;)

Steve.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall