View Single Post
  #24   Report Post  
Old October 25th 10, 04:36 PM posted to uk.railway,uk.transport.london
Sam Wilson Sam Wilson is offline
external usenet poster
 
First recorded activity at LondonBanter: Aug 2003
Posts: 173
Default 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