tor-browser

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

applying-the-exp-operator_A16.js (662B)


      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 base is −∞ and exponent < 0 and exponent is not an odd integer, the result is +0.
      6 esid: sec-applying-the-exp-operator
      7 ---*/
      8 
      9 
     10 var base = -Infinity;
     11 var exponent = new Array();
     12 exponent[4] = -0.000000000000001;
     13 exponent[3] = -2;
     14 exponent[2] = -Math.PI;
     15 exponent[1] = -1.7976931348623157E308; //largest (by module) finite number
     16 exponent[0] = -Infinity;
     17 var exponentnum = 5;
     18 
     19 for (var i = 0; i < exponentnum; i++) {
     20  assert.sameValue(Math.pow(base, exponent[i]), 0, exponent[i]);
     21 }
     22 
     23 reportCompare(0, 0);