[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
Sat Jul 14 09:48:41 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=9697


cwzwarich at uwaterloo.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cwzwarich at uwaterloo.ca




------- Comment #6 from cwzwarich at uwaterloo.ca  2007-07-14 09:48 PDT -------
I have a fairly simple fix for this problem. It occurs because numbers are read
from the most significant digit downwards. To get correct rounding, one should
go from the least significant digit upwards. However, this incurs one extra
multiplication per digit. To get a fix that doesn't slow down the usual case,
simply check if you have overloaded the mantissa, and if you have, go back and
do it in the correct order.

Some of the tests are failing because of parseInt, and others are failing
because this same bug is duplicated in the lexer. Should I make one integer
parsing function that both parseInt and the lexer can use or duplicate the
code?


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