Another Triva Question or Two


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?


Just guessing:

HP 35: arc tan, or x^y

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

Now, give the answers, please!!


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: slowest operations:

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


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.

Possibly Related Threads...
Thread Author Replies Views Last Post
  Triva Question Bob 1 255 02-15-2004, 10:25 PM
Last Post: Ed Martin

Forum Jump: