4 ms·
But doesn't IEEE-754 consider -0 and 0 equal? From https://en.wikipedia.org/wiki/IEEE_floating_point#Total-ordering_predicate https://en.wikipedia.org/wiki/IEEE
by homeomorphic 14y ago
But doesn't IEEE-754 consider -0 and 0 equal? From https://en.wikipedia.org/wiki/IEEE_floating_point#Total-ordering_predicate https://en.wikipedia.org/wiki/IEEE_floating_point#Total-orde... :
"The normal comparison operations however treat NaNs as unordered and compare −0 and +0 as equal."
- ajross 14y agoRight. -0 == 0. The existence of a "-0" is a property of the underlying representation. The mathematical properties don't know about the sign bit, per se.