[Webkit-unassigned] [Bug 19776] Number.toExponential() is incorrect for numbers between 0.1 and 1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 2 10:24:21 PDT 2008


https://bugs.webkit.org/show_bug.cgi?id=19776


cwzwarich at uwaterloo.ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|numbertoexponential gives   |Number.toExponential() is
                   |wrong result  for numbers   |incorrect for numbers
                   |between 0.1 & 0.9999        |between 0.1 and 1




------- Comment #3 from cwzwarich at uwaterloo.ca  2008-07-02 10:24 PDT -------
The value of decimalAdjust in numberProtoFuncToExponential() is wrong when the
value is between 0 and 1.

Consider what happens with n = 0.1. If the number of digits is undefined, we
get:

decimalPoint = 0
decimalAdjust = 0

If the number of digits is defined, we get:

decimalPoint = 1
decimalAdjust = -1


-- 
Configure bugmail: https://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