Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/exponentiation/int32_min-exponent.js

raw
1 // Copyright (C) 2018 Mozilla Corporation. 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: >
7 Using -(2**31) as exponent with the exponentiation operator should behave
8 as expected.
9 ---*/
10
11 const INT32_MIN = -2147483648;
12
13 assert.sameValue(2**INT32_MIN, +0.0,
14 "2**-(gonzo huge exponent > 1074) should be +0 because " +
15 "2**-1074 is the smallest positive IEEE-754 number");
16
17 assert.sameValue(1**INT32_MIN, 1,
18 "1**-(gonzo huge exponent > 1074) should be 1");