summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/exponentiation/applying-the-exp-operator_A11.js
blob: 0f812bcc247c1c7a33aab17cd432af33a483a752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2016 Rick Waldron.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: 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");
	}
}

reportCompare(0, 0);