1 // Copyright (C) 2016 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
7 Return signed Infinity string if this is Infinity
9 Number.prototype.toExponential ( fractionDigits )
11 1. Let x be ? thisNumberValue(this value).
13 5. Let s be the empty String.
18 a. Return the concatenation of the Strings s and "Infinity".
22 assert.sameValue((+Infinity).toExponential(1000), "Infinity", "Infinity value");
23 var n = new Number(+Infinity);
24 assert.sameValue(n.toExponential(1000), "Infinity", "Number Infinity");
26 assert.sameValue((-Infinity).toExponential(1000), "-Infinity", "-Infinity value");
27 var n = new Number(-Infinity);
28 assert.sameValue(n.toExponential(1000), "-Infinity", "Number -Infinity");