Status: New
Owner: ----
New issue 1101 by [email protected]: NaN is converted to
0xfff8000000000000 (-NaN)
http://code.google.com/p/v8/issues/detail?id=1101
When we execute the following code, we get back 0xfff8000000000000 (-NaN):
var buf = new Uint8Array(8);
var dv = new DataView(buf.buffer);
dv.setFloat64(0, NaN, true);
alert(dv.getUint32(4, true).toString(16)); // High 32-bit
alert(dv.getUint32(0, true).toString(16)); // Low 32-bit
However, if we change NaN to parseFloat("NaN"), we get back the correct
value 0x7ff8000000000000 (NaN). In addition, replacing NaN with 0/0 gives
us the incorrect value 0xfff8000000000000.
The above script works correctly in JSC.
We also have a Chromium bug filed to track this issue:
http://code.google.com/p/chromium/issues/detail?id=71979
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev