Hello all,

When calculating sin(M_PI) the computer outputs ~-3e-7. Unfortunately, in my program the error grows (it is multiplied by a number on the order of 1e10) into around -208. My question: is there a way to round a float/double to only 3 digits after the decimal point (I do not care for super high accuracy on the sine function but it looks really bad if the final answer is not 0 when it obviously should be)?

Thank you very much in advance,

Ilya