Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Math/pow/applying-the-exp-operator_A7.js

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