[BUG] Float NaN's

Richard A. O'Keefe ok at cs.otago.ac.nz
Thu Sep 16 05:08:49 UTC 2004


Stephan Rudlof <sr at evolgo.de> wrote:
	Is it true, that we could have
	  aNaN == aNaN & (aNaN ~= aNaN) -> true
	(identity but not equality) here?
	
So try it in a Workspace:
	x := Float nan.
	(x == x) & (x ~= x)
=> true

So yes, that does actually happen.  And there are 2*(2**53-1) bit patterns
that count as IEEE Not-a-Numbers.  (Sign field can be + or -, exponent
field must be 0, significand must not be 0 because that would be Infinity.)




More information about the Squeak-dev mailing list