Y
Hacker News
new
|
ask
|
show
|
jobs
by
andi999
1481 days ago
so x+0 is 0?
1 comments
ncmncm
1481 days ago
No. -0.0 + 0 is not necessarily bitwise-equal to 0.0. Though it arguably could be, depending on details.
link
Sesse__
1481 days ago
-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.
link
titzer
1480 days ago
Note that IEEE 754 defines exactly which zero you get in every combination of operands. -0 + 0 is actually 0.
link