The Museum of HP Calculators

HP Forum Archive 14

[ Return to Index | Top of Index ]

Another Triva Question or Two
Message #1 Posted by David Smith on 16 Feb 2004, 4:57 p.m.

Q1: According to HP, what is the slowest operation to execute on an HP35?

Q2: According to HP, what is the slowest operation to execute on an HP45?

      
Re: Another Triva Question or Two
Message #2 Posted by Andrés C. Rodríguez (Argentina) on 17 Feb 2004, 5:11 p.m.,
in response to message #1 by David Smith

Just guessing:

HP 35: arc tan, or x^y

HP 45: P => R, E+ (sigma), or SDEV

Now, give the answers, please!!

            
Re: Another Triva Question or Two
Message #3 Posted by David Smith on 17 Feb 2004, 5:51 p.m.,
in response to message #2 by Andrés C. Rodríguez (Argentina)

HP35: TAN(9.9999999999e99) HP45: SIN or COS (9.99999999999E99)

Source: Q&A section of the HP35 and HP45 math applications book. I thought the P<->R functions should be slower, but these are the official HP answers.

                  
Re: Another Triva Question or Two
Message #4 Posted by Michael F. Coyle on 18 Feb 2004, 2:13 p.m.,
in response to message #3 by David Smith

Re: slowest operations:

Quote:
HP35: TAN(9.9999999999e99) HP45: SIN or COS (9.99999999999E99)...I thought the P<->R functions should be slower
For R->P the major time-consumers are probably the arctangent, then the square root.

For P->R we have to compute both R*cos(theta) and R*sin(theta), but algorithms like CORDIC will usually generate the sin and cos simultaneously, so the time is probably not much more than for just one of them. This is how the Intel 8087 works, for example.

- Michael

                        
Re: Another Triva Question or Two
Message #5 Posted by Eric Smith on 18 Feb 2004, 2:38 p.m.,
in response to message #4 by Michael F. Coyle

There are two fundamental CORDIC operations, which directly implement R->P and P->R. (Variants of CORDIC can be used for hyperbolic functions, but most commonly it is used for circular functions.)

CORDIC works by doing a series of rotations by carefully chosen angles, such that each rotation can be done with only a small amount of arithmetic. For R->P, you start with a vector specified by x and y components, and rotate it until the y component is zero and x is positive. The sum of the rotation angles is theta, and x is the magnitude.

For P->R, you start with a unit vector with x equal to the desired magnitude and y=0, and rotate it by angles that sum to theta.

I can best describe the process in binary, although HP calculators do the equivalent in decimal.

In binary, the angles are chosen such that their arctangents are negative powers of two. This allows each rotation to be implemented with only bit shifts and binary addition.

The decimal algorithms as used in the HP-35 are described in the article Algorithms and Accuracy in the HP-35 in the June 1972 Hewlett-Packard Journal.


[ Return to Index | Top of Index ]

Go back to the main exhibit hall