3 ms·
I think -0 + 0 == 0 is correct IEEE 754 behavior too. Two numbers that only differ in the sign cancel out to +0 when added together.
by detaro 8y ago
I think -0 + 0 == 0 is correct IEEE 754 behavior too. Two numbers that only differ in the sign cancel out to +0 when added together.
- lelf 8y agoYep, it is +0 under default rounding direction. But +0 == -0 anyway.