Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/exponentiation/applying-the-exp-operator_A7.js

raw
1 // Copyright 2016 Rick Waldron. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-applying-the-exp-operator
6 description: If abs(base) is 1 and exponent is +∞, the result is NaN.
7 ---*/
8
9
10 var exponent = +Infinity;
11 var bases = [];
12 bases[0] = -1;
13 bases[1] = 1
14
15 for (var i = 0; i < bases.length; i++) {
16 assert.sameValue(
17 bases[i] ** exponent,
18 NaN,
19 bases[i] + " ** " + exponent
20 );
21 }