Observability of NaN distinctions — is this a concern?

Jeff Walden jwalden+es at MIT.EDU
Wed Mar 20 11:08:41 PDT 2013

Negation on at least some x86-ish systems also produces another kind of NaN, because the trivial negation implementation is a sign-bit flip.

This strikes me as similar to the endianness concerns of typed arrays, except probably far less harmful in practice.  I don't see what can reasonably be done about it, without effectively mandating attempting NaN-substitution whenever the value to set might be NaN.  But maybe someone smarter has ideas.


More information about the es-discuss mailing list