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

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to g.peterhoff from comment #7)
> I think there is a misunderstanding. The problem is that std::fmin/std::fmax
> and quadmath fminq/fmaxq give different results when only *one* argument is
> signaling_NaN.
> The standard (https://en.cppreference.com/w/cpp/numeric/math/fmin +
> https://en.cppreference.com/w/cpp/numeric/math/fmax) says:
> * If one of the two arguments is NaN, the value of the other argument is
> returned
> * Only if both arguments are NaN, NaN is returned
> 
> quadmath fminq/fmaxq also return NaN if only *one* argument is signaling_NaN.

The cppreference page is wrong.
See https://sourceware.org/bugzilla/show_bug.cgi?id=20947 for reference on why.

Reply via email to