https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96804
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> --- (In reply to Paweł Bylica from comment #0) > This is a problem because when both arguments are NaNs, the result may be > different than the one predicted by IEEE 754. Could you quote the sentence in IEEE 754 that you believe is violated? As far as I can tell, the order doesn't matter: "For an operation with quiet NaN inputs, other than maximum and minimum operations, if a floating-point result is to be delivered the result shall be a quiet NaN which should be one of the input NaNs."