Re:Comparisons in C++20
by yablak on Sunday July 28, 2019 @11:26PM
(#20551313)
Yes, the standard and expected behavior is that logical_op(NaN, anything) == false [except inequality] because NaN is not ordered with, or equal to, anything, including another NaN.
Otherwise you may have the strange behavior that two erroneous values are equal, e.g., 0*inf == tan(inf).
Otherwise you may have the strange behavior that two erroneous values are equal, e.g., 0*inf == tan(inf).