[Bug tree-optimization/83353] Missed optimization in math expression: sin(asin(a)) == a

joseph at codesourcery dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 2 22:28:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83353

--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
asin(sin(a)) is not safe (or at least not simple) because of arguments 
outside [-pi/2, pi/2].  sin(asin(a)) is more appropriate with -ffast-math 
because arguments outside [-1,1] are excluded by -ffinite-math-only, which 
-ffast-math implies.


More information about the Gcc-bugs mailing list