Closed Bug 467276 Opened 11 years ago Closed 11 years ago
N/Infinity .to Exponential(...) should not check range
according to 22.214.171.124 toExponential should verify the range only after it has verified that the number is neither NaN nor Infinity. that is: Infinity.toExponential(-3) should not throw a RangeError.
Assignee: nobody → szegedia
Status: NEW → ASSIGNED
Reviewing the specification, it seems that in addition to toExponential, toPrecision would also need to allow for both NaN and the two infinities to skip range check, and toPrecision also needs to handle undefined value for precision specially. Attached patch fixes all these problems.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
synced to mc: http://hg.mozilla.org/mozilla-central/rev/03d4e7eb5fcb please get a review before checking in js tests or modifications. also, for the time being, please keep in sync with mozilla-central. thanks.
You need to log in before you can comment on or make changes to this bug.