Fix rounding errors for sin, cos