More Oyster Woes ...
In article id,
Dr J R Stockton wrote:
In IEEE-754 floating-point "single" and "Double" number formats. there
is both a +zero and a -zero. They have the same value and compare
equal, ...
As do ones-complement integers (which I assume the IEEE-754 formats use
in some form)...
... but they are distinguishable, even in languages that do not offer
access to the bit patterns as such.
.... though I don't know of any higher-level languages that let you
distinguish between +0 and -0 integers even on hardware that supports
the distinction. (And FWIW the TCP/IP suite uses ones-complement
arithmetic in its checksum calculations.)
Sam
|