On July 22 I wrote: > I see three ways to go here. > > 1. We change eql, memql, sxhash-eql, etc. to treat all NaNs alike, so that there > is just one NaN value from the Lisp point of view. We also change 'format', > 'copysign' etc. to ignore a NaN's sign, and look through any other use of > floating-point values to make sure that NaN signs are ignored. > > 2. We change eql, memql, sxhash-eql, etc. so that only the sign (not the > significand) of a NaN is looked at, so that there are just two NaN values from > the Lisp point of view. > > 3. We alter 'read', 'format' etc. to read and generate NaN significands. For > example, (format "%s" NaN) could return "0.1e+NaN" if the significand's > low-order bit was set. > > (1) sounds too drastic, as the sign of a NaN can be useful in some cases and > Emacs has long provided for obtaining the sign of a NaN. Although either (2) or > (3) would be OK, I'm inclined to go for (3) as I expect it would be a bit > cleaner and more useful. No further comment on this, and I went with (3) and installed into master the attached patch to do something along those lines on platforms that have ieee754.h (mostly GNUish platforms, I expect). Other platforms are unaffected.