This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/83240] x86_64 vectorized sqrt of denormal yields -inf when DAZ=0


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]