Debian Codegraph @

js/src/tests/test262/built-ins/Math/clz32/nan.js

raw
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 NaN
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(NaN), 32);
23
24 reportCompare(0, 0);