fix accuracy problems near roots for cos and sin
fix accuracy problems near roots for cos and sin

JensGrabner/mpmath,bjodah/mpmath,klkuhlm/mpmath,fredrik-johansson/mpmath,klkuhlm/mpmath,JensGrabner/mpmath,bjodah/mpmath