Floating-point equality and inequality
floating-point
Solution
Yes, this will be always true, there are no number interpretations of bit patterns for which the operator == will not return the exact opposite for !=.
There are exceptions for bit patterns which compare as equal for different bit patterns (negative zero 0x80... is equal to zero 0x00...) or same bit pattern compare as unequal (NaNs) as you already mentioned, but != is always the inversion of ==.
Problem
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?