Debian Codegraph @

js/src/tests/test262/language/expressions/exponentiation/applying-the-exp-operator_A8.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 features: [exponentiation]
8 ---*/
9
10
11 var exponent = -Infinity;
12 var bases = [];
13 bases[0] = -1;
14 bases[1] = 1
15
16 for (var i = 0; i < bases.length; i++) {
17 assert.sameValue(
18 bases[i] ** exponent,
19 NaN,
20 bases[i] + " ** " + exponent
21 );
22 }
23
24 reportCompare(0, 0);