2014-12-14 01:01:34 +01:00
|
|
|
|
// Copyright 2016 Rick Waldron. All rights reserved.
|
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
/*---
|
2016-02-22 20:46:39 +01:00
|
|
|
|
esid: sec-applying-the-exp-operator
|
2014-12-14 01:01:34 +01:00
|
|
|
|
description: If base is −∞ and exponent < 0 and exponent is an odd integer, the result is −0.
|
2023-03-23 10:51:08 +01:00
|
|
|
|
features: [exponentiation]
|
2014-12-14 01:01:34 +01:00
|
|
|
|
---*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var base = -Infinity;
|
|
|
|
|
var exponents = [];
|
|
|
|
|
exponents[2] = -1;
|
|
|
|
|
exponents[1] = -111;
|
|
|
|
|
exponents[0] = -111111;
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < exponents.length; i++) {
|
2021-09-15 23:08:12 +02:00
|
|
|
|
assert.sameValue(base ** exponents[i], -0, base + " ** " + exponents[i]);
|
2014-12-14 01:01:34 +01:00
|
|
|
|
}
|