initial point in CORDIC algorithm

132 Views Asked by At

I am trying to reduce number of iterations required to calculate multiplication using the CORDIC algorithm because I am using this algorithm in a continuous function to calculate square function. Here is the algorithm assuming -1<x<1'

function z=square(x)
 y=x;
 z=0;
  for i=1:15
    if (x > 0)
      x = x - 2^(-i);
      z = z + y*2^(-i);
    else
      x = x + 2^(-i);
      z = z - y*2^(-i);
    end
  end
return
end

I already know the close value to multiplication result (from the previous result (call it pr)) and value of x (the value of x is continuous) . Does it help in anyway to decrease number of iterations?

1

There are 1 best solutions below

0
On

If you are multiplying twice by the same constant, say a.x and a.x', then you can multiply and add with the delta a.(x' - x), which has less significant digits.

In case both factors vary, you can still use

x'.y' = (x'- x).(y' - y) + x.(y' - y) + (x' - x).y + x.y

where maybe the first term is neglectible.

For a square,

x'² = (x'- x)² + 2.x.(x' - x) + x²