e2db5bb81d5f5409c5f8b9990c8dbf5583ae098480b3bb049e990845c1700f0c925bdccacb5e8e69492eff103fff2d1e2e950b6a0ebfaebe91a68eca72ecf4 338 B

123456789101112131415
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var floor = Math.floor;
  4. var log = Math.log;
  5. var LOG2E = Math.LOG2E;
  6. // `Math.clz32` method
  7. // https://tc39.es/ecma262/#sec-math.clz32
  8. $({ target: 'Math', stat: true }, {
  9. clz32: function clz32(x) {
  10. var n = x >>> 0;
  11. return n ? 31 - floor(log(n + 0.5) * LOG2E) : 32;
  12. }
  13. });