Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Math/pow/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 Math.pow should behave as expected.
8 ---*/
9
10 const INT32_MIN = -2147483648;
11
12 assert.sameValue(Math.pow(2, INT32_MIN), +0.0,
13 "Math.pow(2, -(gonzo huge exponent > 1074)) should be +0 " +
14 "because 2**-1074 is the smallest positive IEEE-754 number");
15
16 assert.sameValue(Math.pow(1, INT32_MIN), 1,
17 "1**-(gonzo huge exponent > 1074) should be 1");