tor-browser

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

S11.6.1_A4_T3.js (804B)


      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 info: |
      6    The result of an addition is determined using the rules of IEEE 754
      7    double-precision arithmetics
      8 es5id: 11.6.1_A4_T3
      9 description: >
     10    The sum of two infinities of the same sign is the infinity of that
     11    sign
     12 ---*/
     13 
     14 //CHECK#1
     15 if (Number.POSITIVE_INFINITY + Number.POSITIVE_INFINITY !== Number.POSITIVE_INFINITY ) {
     16  throw new Test262Error('#1: Infinity + Infinity === Infinity. Actual: ' + (Infinity + Infinity));
     17 }
     18 
     19 //CHECK#2
     20 if (Number.NEGATIVE_INFINITY + Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY ) {
     21  throw new Test262Error('#2: -Infinity + -Infinity === -Infinity. Actual: ' + (-Infinity + -Infinity));
     22 }
     23 
     24 reportCompare(0, 0);