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.
|