Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/exponentiation/applying-the-exp-operator_A9.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) < 1 and exponent is +∞, the result is +0.
7
8 ---*/
9
10
11 var exponent = +Infinity;
12 var bases = [];
13 bases[0] = 0.999999999999999;
14 bases[1] = 0.5;
15 bases[2] = +0;
16 bases[3] = -0;
17 bases[4] = -0.5;
18 bases[5] = -0.999999999999999;
19
20 for (var i = 0; i < bases.length; i++) {
21 if ((bases[i] ** exponent) !== +0) {
22 $ERROR("(" + bases[i] + " ** " + exponent + ") !== +0");
23 }
24 }