Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/exponentiation/applying-the-exp-operator_A21.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 base is −0 and exponent < 0 and exponent is an odd integer, the result is −∞.
7 ---*/
8
9
10 var base = -0;
11 var exponents = [];
12 exponents[2] = -1;
13 exponents[1] = -111;
14 exponents[0] = -111111;
15
16 for (var i = 0; i < exponents.length; i++) {
17 if ((base ** exponents[i]) !== -Infinity) {
18 $ERROR("(" + base + " ** " + exponents[i] + ") !== -Infinity");
19 }
20 }