
March 25, 2010
7:33 p.m.
IMO, we should go for the simplest of all usage: a NaN singleton, shared by float and Decimal, compares equal to itself, unsortable, no payload. Usage of the payload is hypothetical. Situations where comparing false is "more correct" than comparing true are hypothetical, and grossly outweighed by the situations where comparing true is blatantly correct. IEEE 754 doesn't say NaN should compare false; it says it should compare "unordered". We can't do that as we're not using a 4-way comparison (which wouldn't generalize to complex anyway), so we have to make up our own solution. It might as well fit our needs, rather than nobodies. -- Adam Olsen, aka Rhamphoryncus