0.0.62 ⢠Published 4 years ago
@extra-bigint/log-2 v0.0.62
Gives base-2 logarithm of value. š¦ NPM, šŗ GitHub, š RunKit, š Minified, š Files, š° JSDoc, š Wiki.
This is part of package extra-bigint.
bigint.log2(x);
// x: a bigint
const bigint = require('extra-bigint');
bigint.log2(16n);
// 4n
bigint.log2(15n);
// 3n
bigint.log2(0n);
// null