https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103005
--- Comment #3 from Andreas Röver <andreas_roever at web dot de> --- I think the source of the problem is function __fold_input(const simd<double, _Abi>& __x) in simd_math.h this function should return values between -pi/4 and pi/4 but doesn't for the big argument. E.g for 2985064393126969344 it returns 27.678747 according to wolfram alpha it should return 0.189812 This "big" value throws off the calculation of the power series that is performed after this the 27.678646 is the result of a rounding error 2985064393126969344 / (pi/2) is (according to wolfram alpha again) 1900351014455063569.620838 but the CPU gets 1900351014455063552 This seems to be the closest value that the CPU can get to the real value. the difference between those 2 times pi/2 is the above mentioned 27.67... ... now my numerics skills are not good enough to find a cure for that problem.