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

--- Comment #5 from Andreas Gustafsson <gson at gson dot org> ---
Re "may violate IEEE or ANSI standards", that argument could be used to justify
any behavior, even making 1 + 1 yield 42.  Clearly the intent of
-funsafe-math-optimizations is not to allow arbitrary incorrect results, but
minor deviations from the standard such as differences in rounding or
evaluation order that result in reasonable approximations of the correct result
even if they differ from the exact result required by the standard.

When taking the square root of a very small positive number, a result of 0 is a
reasonable approximation of the correct result, even though it violates the
standard, but a result of minus infinity is not.

Reply via email to