[Webkit-unassigned] [Bug 9697] parseInt results may be inaccurate for numbers greater than 2^53
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sun Jul 15 23:01:23 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=9697
cwzwarich at uwaterloo.ca changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #15527| |review?
Flag| |
------- Comment #8 from cwzwarich at uwaterloo.ca 2007-07-15 23:01 PDT -------
Created an attachment (id=15527)
--> (http://bugs.webkit.org/attachment.cgi?id=15527&action=view)
Proposed patch
Here is a patch that fixes these problems, as well as some other problems
related to numeric conversions. It fixes all of the JS Core tests related to
numeric conversion except three in ecma/TypeConversion/9.3.1-3.js. The first
two are actually incorrect tests:
--> - "-0x123456789abcde8" = NaN FAILED! expected: 81985529216486880
--> - "-0x123456789abcde8" = NaN FAILED! expected: 81985529216486880
The ECMA spec (9.3.1) does not allow signs in hexadecimal numbers coerced by
ToNumber(). The last is a specific instance of bug 4885:
--> -"\u20001234\u2001" = NaN FAILED! expected: -1234
It is difficult to make all of the conversion happen in one place, due to
different char sizes and slightly different parsing requirements. Maybe I will
do it at a later time when everything is using wide chars.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list