Hacker News new | ask | show | jobs
by andi999 1481 days ago
so x+0 is 0?
1 comments

No. -0.0 + 0 is not necessarily bitwise-equal to 0.0. Though it arguably could be, depending on details.
-0.0 + x = x, even if x should be -0.0 or +0.0.

+0.0 + x, on the other hand, is not always equal to x.

Note that IEEE 754 defines exactly which zero you get in every combination of operands. -0 + 0 is actually 0.