4 ms·
-0.0 = 0 +0.0 = 0 Hence -0.0 = +0.0 right ?
by codegeek 3y ago
-0.0 = 0
+0.0 = 0
Hence -0.0 = +0.0 right ?
- munk-a 3y agoYup - both of the bit patterns for 754 here were assigned the value of 0 and the standard instructed comparison operators to treat the two values as equal. The bit patterns for both -0.0 and +0.0 are assigned to the same real world value - there is no reason to distinguish them outside of circuits that actually execute floating point arithmetic.
- kragen 3y agoit's important to distinguish them in programs written for those circuits and in compilers that transform those programs because they have significantly and intentionally different behavior