We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Check if bigint is a power-of-2.
Similar: isPow2, isPow10. Similar: isPow2, prevPow2, nextPow2.
function isPow2(x) // x: a bigint
const xbigint = require('extra-bigint'); xbigint.isPow2(32n); // → true xbigint.isPow2(1023n); // → false