tor-browser

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

S11.5.2_A4_T9.js (1382B)


      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 division is determined by the specification of IEEE 754
      7    arithmetics
      8 es5id: 11.5.2_A4_T9
      9 description: >
     10    If the magnitude is too large to represent, the result is then an
     11    infinity of appropriate sign
     12 ---*/
     13 
     14 //CHECK#1
     15 if (Number.MAX_VALUE / 0.9 !== Number.POSITIVE_INFINITY) {
     16  throw new Test262Error('#1: Number.MAX_VALUE / 0.9 === Number.POSITIVE_INFINITY. Actual: ' + (Number.MAX_VALUE / 0.9));
     17 }
     18 
     19 //CHECK#2
     20 if (Number.MAX_VALUE / -0.9 !== Number.NEGATIVE_INFINITY) {
     21  throw new Test262Error('#2: Number.MAX_VALUE / -0.9 === Number.NEGATIVE_INFINITY. Actual: ' + (Number.MAX_VALUE / -0.9));
     22 } 
     23 
     24 //CHECK#3
     25 if (Number.MAX_VALUE / 1 !== Number.MAX_VALUE) {
     26  throw new Test262Error('#3: Number.MAX_VALUE / 1 === Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE / 1));
     27 }
     28 
     29 //CHECK#4
     30 if (Number.MAX_VALUE / -1 !== -Number.MAX_VALUE) {
     31  throw new Test262Error('#4: Number.MAX_VALUE / -1 === -Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE / -1));
     32 } 
     33 
     34 //CHECK#5
     35 if (Number.MAX_VALUE / (Number.MAX_VALUE / 0.9) === (Number.MAX_VALUE / Number.MAX_VALUE) / 0.9) {
     36  throw new Test262Error('#5: Number.MAX_VALUE / (Number.MAX_VALUE / 0.9) !== (Number.MAX_VALUE / Number.MAX_VALUE) / 0.9');
     37 }
     38 
     39 reportCompare(0, 0);