Wrong Sine and Cosine results

josefvs

New Member
Hi All,

Using a 28X2, calculating both SIN and COS I keep getting 69 as the result and not 71.

Does anybody knows why?

Thanks
 

Technical

Technical Support
Staff member
Please post your code, but it is probably due to the lookup table calculation.

The sin function returns a number equivalent to the sine of the value in degrees.
The system uses a 45 step lookup table in each quadrant, giving a very fast, and
reasonably accurate, result
 

bfgstew

Senior Member
Tried this in simulation and works, change sin value and works every time.

let w0 = sin 45
sertxd (cr,lf,#w0)
 

Technical

Technical Support
Staff member
>> 45 step lookup table.

So a lookup table step every 2 degrees, so 45 is processed as 44.
sin 44 = 0.69 X 100 = 69

next step is at sin 46
 
Last edited:
Top