Steps to reproduce: Test case: --- js> Number.prototype.toExponential.call(NaN, 555) typein:63: RangeError: precision 555 out of range js> Number.prototype.toPrecision.call(NaN, 555) typein:64: RangeError: precision 555 out of range --- Expected results: According to [15.7.4.6 Number.prototype.toExponential (fractionDigits)] step 4 resp. step 6 and according to [15.7.4.7 Number.prototype.toPrecision (precision)] step 4 resp. step 7, toExponential()/toPrecision() return "NaN" (or "Infinity") if the this-argument is `NaN` (or `Infinity`). The actual range check on the input argument happens after (!) handling `NaN`/`Infinity`.
Does no longer reproduce at r215724.