I executed a lookup table to calculate the sine / cosine values on my system. Now I need inverse trigonometric functions (arcsin / arccos).
My application runs on an embedded device on which I cannot add a second lookup table for arcsin, since I am limited in program memory. So the solution I had in mind was to look at the sine lookup table to get the corresponding index.
I am wondering if this solution will be more efficient than using a standard implementation coming from a mathematical standard library.
Has anyone already experimented on this?
The current LUT implementation is an array of sine values from 0 to PI / 2. The value stored in the table is multiplied by 4096 to stay with integer values with sufficient accuracy for my application. A lookup table as a resolution of 1/4096, which gives us an array of 6434 values. Then I have two sine and cosine functionalities, which takes an angle in the radian, multiplied by 4096 as an argument. These functions convert the given angle to the corresponding angle in the first quadrant and read the corresponding value in the table.
My application runs on dsPIC33F at 40 MIPS and I use the C30 compilation set.
source share