This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280049: Error in trigonometric functions

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hi all,

I am using the TMS320F280049 series for my application. I have used the sin function by assigning it to a double and provided it parameter also as a double variable. When I pass PI i.e 180 degrees in the sine function, it returns a negative value like -4.37139533e-08. Ideally it should return 0. I have included math.h as well. How do I rectify this issue?

Code:

double number;

double sine_of_number;

number = M_PI;

sine_of_number = sin(number);

Regards,

Pranav