https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114140
--- Comment #8 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. As I can show this is not just about quadmath either. glibc's fminf/fmaxf has the same behavior there.