tor-browser

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

infinity.js (629B)


      1 // Copyright (C) 2016 The V8 Project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-math.clz32
      6 description: >
      7  Return 32 if x is Infinity or -Infinity
      8 info: |
      9  Math.clz32 ( x )
     10 
     11  1. Let n be ToUint32(x).
     12  2. Let p be the number of leading zero bits in the 32-bit binary representation of n.
     13  3. Return p.
     14 
     15  7.1.6 ToUint32 ( argument )
     16 
     17  [...]
     18  2. If number is NaN, +0, -0, +∞, or -∞, return +0.
     19  [...]
     20 ---*/
     21 
     22 assert.sameValue(Math.clz32(Infinity), 32, "Infinity");
     23 assert.sameValue(Math.clz32(-Infinity), 32, "-Infinity");
     24 
     25 reportCompare(0, 0);