[Bug libquadmath/114140] different results for std::fmin/std::fmax and quadmath fminq/fmaxq if one argument=signaling_NaN
xry111 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 28 11:36:37 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114140
Xi Ruoyao <xry111 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |documentation
CC| |xry111 at gcc dot gnu.org
--- Comment #16 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #15)
> It's the old argument on whether isnan(NaN) should return true or false with
> -ffinite-math-only. With what we currently do "constant folding" sNaN into
> NaN would be correct with -fno-signalling-nans, likewise constant folding
> Inf into 42.0 is "correct" for -ffinite-math-only.
>
> You are basically invoking undefined beavior when introducing sNaN into a
> program without using -fsignalling-nans.
Then we should make it more clear in invoke.texi. Currently the doc is
implying the worst consequence using sNaN with -fno-signalling-nans is
"changing the number of raised exceptions."
More information about the Gcc-bugs
mailing list