Observability of NaN distinctions — is this a concern?

Brandon Benvie bbenvie at mozilla.com
Tue Mar 26 10:03:45 PDT 2013

On 3/26/2013 1:12 AM, Jussi Kalliokoski wrote:
> The NaN distinction is only observable in the byte array, not if you 
> extract the value, because at that point it becomes an ES NaN value, 
> so that example is invalid.
It becomes observable on the read end by doing:

     float64array[0] = shouldBeImmutable.foo;
     new Uint32Array(float64array.buffer)[0]; // or [1] depending on 

...unless you canonicalize the NaN on either on the read or the write. 
This is pretty damning.

More information about the es-discuss mailing list