3 ms·
It defines also -0 == 0 and NaN != NaN. That's alone makes it rather weird
by sharikous 5y ago
It defines also -0 == 0 and NaN != NaN.
That's alone makes it rather weird
- colejohnson66 5y agoWhy is defining negative zero equal to positive zero confusing? Because -0 < 0? That's to ensure there's total ordering - if they're equal (but not "identical"), you need some definition on ordering them. I can understand the confusion many have with NaN, but the idea is that it's not a number, so it's not equal to anything in a number-like type.
- jjgreen 5y agohypot(Inf, NaN) == Inf suggests otherwise.