mirror of https://github.com/tc39/test262.git
22 lines
595 B
JavaScript
22 lines
595 B
JavaScript
|
// Copyright 2016 Rick Waldron. All rights reserved.
|
||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||
|
|
||
|
/*---
|
||
|
id: sec-applying-the-exp-operator
|
||
|
description: If base is +∞ and exponent > 0, the result is +∞.
|
||
|
---*/
|
||
|
|
||
|
|
||
|
var base = +Infinity;
|
||
|
var exponents = [];
|
||
|
exponents[3] = Infinity;
|
||
|
exponents[2] = 1.7976931348623157E308; //largest (by module) finite number
|
||
|
exponents[1] = 1;
|
||
|
exponents[0] = 0.000000000000001;
|
||
|
|
||
|
for (var i = 0; i < exponents.length; i++) {
|
||
|
if (base ** exponents[i] !== +Infinity) {
|
||
|
$ERROR("(" + base + " ** " + exponents[i] + ") !== +Infinity");
|
||
|
}
|
||
|
}
|