Originally Posted by Thantos
Of course, the two's complement number system used in most computers does not have a representation for negative zero. My point is that sometimes you can print a floating point number which appears to be negative zero (but that's only because you didn't print enough significant digits).
In any comparison with doubles or floats you must be aware of the possibility of roundoff error, even though the numbers are "rational" in base 10.
My example shows on my computers that 0.1 + 0.1 may not give the same answer as 1.0 - 0.8
Regards,
Dave