Bug 16651 - Firefox and JavaScriptCore differ in printing toFixed, toPrecision, toExponential
Summary: Firefox and JavaScriptCore differ in printing toFixed, toPrecision, toExponen...
Status: RESOLVED DUPLICATE of bug 44745
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-28 20:11 PST by Eric Seidel (no email)
Modified: 2010-08-27 12:58 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-12-28 20:11:24 PST
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.
Comment 2 Darin Fisher (:fishd, Google) 2009-03-21 15:19:52 PDT
V8 seems to match Firefox.
Comment 3 Gavin Barraclough 2010-08-27 12:58:46 PDT

*** This bug has been marked as a duplicate of bug 44745 ***