int32_min-exponent.js (661B)
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 features: [exponentiation] 10 ---*/ 11 12 const INT32_MIN = -2147483648; 13 14 assert.sameValue(2**INT32_MIN, +0.0, 15 "2**-(gonzo huge exponent > 1074) should be +0 because " + 16 "2**-1074 is the smallest positive IEEE-754 number"); 17 18 assert.sameValue(1**INT32_MIN, 1, 19 "1**-(gonzo huge exponent > 1074) should be 1"); 20 21 reportCompare(0, 0);