Re: Observability of NaN distinctions — is this a concern?

Allen Wirfs-Brock allen at wirfs-brock.com
Wed Mar 20 12:14:38 PDT 2013


On Mar 20, 2013, at 11:08 AM, Jeff Walden wrote:

> 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.

It simple, all isNaN testing and all places that perform "pointer equivalent" tests must treat all NaN values as equivalent.   An implementation  either must guarantee normalization or NaNs or explicitly check for non identical NaN bit patterns.

Allen




More information about the es-discuss mailing list