Hacker News new | ask | show | jobs
by ncmncm 1480 days ago
No. -0.0 + 0 is not necessarily bitwise-equal to 0.0. Though it arguably could be, depending on details.
2 comments

-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.