RESOLVED DUPLICATE of bug 16640 5259
toExponential() doesn't handle enough cases
https://bugs.webkit.org/show_bug.cgi?id=5259
Summary toExponential() doesn't handle enough cases
George Staikos
Reported 2005-10-04 11:15:15 PDT
toExponential() doesn't handle: - no arguments - large arguments - invalid arguments FireFox passes these: Number(123.456).toExponential() == 1.23456e+2 Number(123.456).toExponential(21) == 1.234560000000000030695e+2 Number(123.456).toExponential("foo") == 1e+2 I have a patch for the first case but not the rest.
Attachments
Alexey Proskuryakov
Comment 1 2006-01-13 13:27:04 PST
Confirmed with ToT; the first case now works as described.
Sam Weinig
Comment 2 2007-02-23 19:25:22 PST
For the large arguments part, Firefox supports sizes up to 100, and reports a "precision <num> out of range" error for anything greater.
Mark Rowe (bdash)
Comment 3 2007-11-01 06:52:49 PDT
Another case reported on IRC: 1..toExponential(10) == 1.0000000000e+0 WebKit currently reports 1e+0.
Mark Rowe (bdash)
Comment 4 2007-11-01 06:55:04 PDT
Eric Seidel (no email)
Comment 5 2007-12-28 15:16:58 PST
The patches attached to bug 16640 make us pass these tests. I'm going to dup this to bug 16640 unless there are objections. *** This bug has been marked as a duplicate of 16640 ***
Note You need to log in before you can comment on or make changes to this bug.