tor-browser

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

applying-the-exp-operator_A1.js (722B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 description: If exponent is NaN, the result is NaN.
      6 esid: sec-applying-the-exp-operator
      7 ---*/
      8 
      9 
     10 var exponent = NaN;
     11 var base = new Array();
     12 base[0] = -Infinity;
     13 base[1] = -1.7976931348623157E308; //largest (by module) finite number
     14 base[2] = -0.000000000000001;
     15 base[3] = -0;
     16 base[4] = +0
     17 base[5] = 0.000000000000001;
     18 base[6] = 1.7976931348623157E308; //largest finite number
     19 base[7] = +Infinity;
     20 base[8] = NaN;
     21 base[9] = 1;
     22 var basenum = 10;
     23 
     24 for (var i = 0; i < basenum; i++) {
     25  assert.sameValue(
     26    Math.pow(base[i], exponent),
     27    NaN,
     28    base[i]
     29  );
     30 }
     31 
     32 reportCompare(0, 0);