Floating-point equality comparison sometimes has weird edge cases e.g. two NaN values compare as not equal even if they are identical bit patterns.
Can it be assumed, however, that inequality is always the inverse of equality? That is, assuming standard IEEE 64-bit floating-point numbers as implemented on mainstream architectures such as x64, exactly one of a == b
and a != b
will always be true regardless of what bit patterns are present?