# Re: Calc - COS(), can this be fixed?

It is readily apparent that the COS() function is inaccurate (check COS(PI()/2).

I do not know if this is a system call, or an internal math library. Either way it can be fairly unhelpful for precision calculations. Also, SIN() on larger angles is not accurately handled (check: SIN(PI()) should return 0, it does not).

A work-around is to instead: 1) if angle > pi/2 then reduce it to QI and deal with sign issues separately 2) if COS(angle) is desired, call SIN(PI()/2 - angle) instead

Can the trig function accuracy be improved? Or, failing that, is there any hope of incorporating this into the program itself so that the function error is more transparent to the end-user? Any factor of pi/2 should be correct regardless of other floating point errors. (Many other functions you may care to perform rely upon factors of PI/2 cancelling out variables in those locations).