1 // Copyright (C) 2017 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
5 esid: sec-number.prototype.toexponential
6 description: Number.prototype.toExponential permits fractionDigits from 0 to 100
8 Number.prototype.toExponential ( fractionDigits )
11 8. If _p_ < 0 or _p_ > 100, throw a *RangeError* exception.
15 assert.sameValue((3).toExponential(0), "3e+0");
16 assert.throws(RangeError, () => (3).toExponential(-1));
18 assert.sameValue((3).toExponential(100), "3.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+0");
19 assert.throws(RangeError, () => (3).toExponential(101));