On Fri, 24 Feb 2012 09:23:08 -0700, Michael Torrie wrote: > All this reminds me of the original cray supercomputers. They didn't > use twos compliment for integers so they had two representations of zero > (+0 and -0). Made programming a bit tricky.
While there is only one integer zero, I would like to point out that in floating point, there are usually two zeroes, -0.0 and +0.0, and that this is by design and a feature, not an accident or a bug. Well-written floating point functions should keep the sign when they underflow, e.g.: py> 1e-200 * 1e-200 0.0 py> 1e-200 * -1e-200 -0.0 and well-written functions should honour those separate zeroes because sometimes it makes a difference. -- Steven -- http://mail.python.org/mailman/listinfo/python-list