Gentlemen,
I´m developing a 3D algorithm and I need to evaluate cos(pi/2).
I´m using the a constant defined by M_PI_2 as the argument above.
While debugging my code, I notice that evaluating cos(M_PI_2) returns a value that is "almost" zero: 6.32...e-17.
In this situation, the incorrect value I ended up with is being propagate through my code and I´m facing with inconsistent results.
Does anyone know how to deal with this? Limiting float or double precision...
Need some help. Thanks.