Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: An error-catching question



Michel Hack wrote:
Juergen Wolff von Gudenberg wrote (and others have referenced):
my suggestion is well known, See Motion 7
  use [+Nan,+nan] for emptyset
  use [-nan,-nan] for NaI

Careful here!  Encoding information (e.g. Empty vs NaI) in the sign bit
of a NaN is very dangerous in 754-based environments, as a NaN sign is
defined to be meaningless, and may not be propagated predictably.  For
example, the sign of NaN*Num may be the XOR of the operand signs, even
though the NaN payload will be preserved.  (For NaN*NaN one of the two
payloads will be preserved -- which one is in general NOT predictable.)


I was kind of thinking the same thing.

Perhaps it might be better if certain bits in the NaN payload are used to make a distinction between empty set and bare decorations (NaI) instead.

Nate