Bug 16651
Summary: | Firefox and JavaScriptCore differ in printing toFixed, toPrecision, toExponential | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | ager, barraclough, emacemac7, gavin.sharp |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.4 |
Eric Seidel (no email)
WebKit and JavaScriptCore in printing toFixed, toPrecision, toExponential
As part of r29020 I checked in results which agree with Firefox.
Pretty much all of the failures are intentional (range) differences from Firefox. There are a couple failures which I am uncertain about:
FAIL (1234.567).toPrecision(21) should be 1234.56700000000000728. Was 1234.56700000000000000.
FAIL (1234.567).toFixed(20) should be 1234.56700000000000727596. Was 1234.56700000000000000000.
FAIL (123.456).toExponential(20) should be 1.23456000000000003070e+2. Was 1.23456000000000000000e+2.
I'm not sure why there would be junk at the end of the values from firefox, but perhaps that's just part of the ECMA algorithm. We'll need to decide, and either file a bug with Firefox or chose to be different.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
See:
http://bclary.com/2004/11/07/#a-15.7.4.6
http://bclary.com/2004/11/07/#a-15.7.4.7
Darin Fisher (:fishd, Google)
V8 seems to match Firefox.
Gavin Barraclough
*** This bug has been marked as a duplicate of bug 44745 ***