1

It is Possible to use cordic in base 10. Each iteration involves a multiply by 10^-i.

With cordic in base 2 you get very good convergence using i = {0,1,2,3,4,5,6,7,8,9,10,11,12,13....} but in base 10 you have to pick better i values. I've been playing with these values and have not been able find a set that is good for all range inputs. It is probably needed at least 2 sets of i to use that are picked based on the mantissa.

Assuming you have the time to rework floating point trig functions. smile
My exams start next week.


Some introduction Cordic in base 2. How to calculate atan(5)

1) Create the vector x=1, y=5

2) On each iteration we will rotate clockwise or counter clockwise by an angle of atan(2^-i) [base can be changed]

3) Rotate the vector in 2d space:

xNew = xOld-direction*yOld*2^-i. [base can be changed]
yNew = yOld+direction*xOld*2^-i

This rotation will change the radius of the vector but not the angle of the vector.


4) on each iteration direction is chosen to get y=0. If y is positive we rotate counter clockwise [direction is -1]. If y is negative then we rotate clockwise. [direction = 1].

5) As rotations are done the angles of rotation are accumulated. angleNew = angleOld-direction*atan(2^-i). atan(2^-i) is kept in a lookup table.

20 iterations of this with i= {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19} on each iteration calculated atan(5) = 1.37340121568545. This is 100.00003267 % accurate.

20 iterations of cordic says that atan(0.001) = 0.00099902186150. This is 99.9% Accurate. For such a small input using different i's would be better.




-Samuel
I am the one and only cheerio.
-Samuel Stearley

2

In which book I can have a complete description ?

3

I have yet to find any book/article that is the best description of how to do cordic
I am the one and only cheerio.
-Samuel Stearley