Debian Codegraph @

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