Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Math/pow/applying-the-exp-operator_A5.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) > 1 and exponent is +∞, the result is +∞.
6 esid: sec-applying-the-exp-operator
7 ---*/
8
9
10 var exponent = +Infinity;
11 var base = new Array();
12 base[0] = -Infinity;
13 base[1] = -1.7976931348623157E308; //largest (by module) finite number
14 base[2] = -1.000000000000001;
15 base[3] = 1.000000000000001;
16 base[4] = 1.7976931348623157E308; //largest finite number
17 base[5] = +Infinity;
18 var basenum = 6;
19
20 for (var i = 0; i < basenum; i++) {
21 if (Math.pow(base[i], exponent) !== +Infinity) {
22 $ERROR("#1: Math.pow(" + base[i] + ", " + exponent + ") !== +Infinity");
23 }
24 }