tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

applying-the-exp-operator_A4.js (754B)


      1 // Copyright 2016 Rick Waldron.  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: If base is NaN and exponent is nonzero, the result is NaN.
      7 features: [exponentiation]
      8 ---*/
      9 
     10 
     11 var base = NaN;
     12 var exponents = [];
     13 exponents[0] = -Infinity;
     14 exponents[1] = -1.7976931348623157E308; //largest (by module) finite number
     15 exponents[2] = -0.000000000000001;
     16 exponents[3] = 0.000000000000001;
     17 exponents[4] = 1.7976931348623157E308; //largest finite number
     18 exponents[5] = +Infinity;
     19 exponents[6] = NaN;
     20 
     21 for (var i = 0; i < exponents.length; i++) {
     22  assert.sameValue(
     23    base ** exponents[i],
     24    NaN,
     25    base + " ** " + exponents[i]
     26  );
     27 }
     28 
     29 reportCompare(0, 0);