tor-browser

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

applying-the-exp-operator_A9.js (561B)


      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 abs(base) < 1 and exponent is +∞, the result is +0.
      6 esid: sec-applying-the-exp-operator
      7 ---*/
      8 
      9 
     10 var exponent = +Infinity;
     11 var base = new Array();
     12 base[0] = 0.999999999999999;
     13 base[1] = 0.5;
     14 base[2] = +0;
     15 base[3] = -0;
     16 base[4] = -0.5;
     17 base[5] = -0.999999999999999;
     18 var basenum = 6;
     19 
     20 for (var i = 0; i < basenum; i++) {
     21  assert.sameValue(Math.pow(base[i], exponent), 0, exponent);
     22 }
     23 
     24 reportCompare(0, 0);