[Webkit-unassigned] [Bug 16640] New: Acid3 reveals broken behavior in toFixed and toExponential

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 28 02:15:09 PST 2007


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

           Summary: Acid3 reveals broken behavior in toFixed and
                    toExponential
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Keywords: EasyFix
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org


Acid3 reveals broken behavior in toFixed and toExponential

This section of the test fails miserably:

      if ((0.0).toFixed(4) != "0.0000" ||
         (-0.0).toFixed(4) != "0.0000")
        ok = false;
      if ((0.0).toExponential(4) != "0.0000e+0" ||
         (-0.0).toExponential(4) != "0.0000e+0")
        ok = false;

I can't imagine this is intentional.  Current behavior:

(0.0).toFixed(4)
0.0000
(-0.0).toFixed(4)
0.00-0
(0.0).toExponential(4)
NaN
(-0.0).toExponential(4)
NaN


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