3 ms·
Negative zero is very, very annoying because it means that many floating point identities flies out of the window. x + 0.0 != x, x * 0.0 != 0.0, etc. It makes i
by bjourne 3y ago
Negative zero is very, very annoying because it means that many floating point identities flies out of the window. x + 0.0 != x, x * 0.0 != 0.0, etc. It makes it much harder for the compiler to optimize arithmetic. Thus, at least some SIMD circuits do not follow ieee754 to the letter because it would result in performance degradations.
- stkdump 3y agoThose identities do hold though, as long as zero and negative zero compare equal, which according to ieee754 they should. Performance degredations happen in other places such as denormals.
- kragen 3y ago1/0!=1/-0
- pklausler 3y agoI find it so strange that IEEE-754 SQRT(-0.) is -0., even though (-0.)*(-0.) is +0.