We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Check if a number is a power-of-n.
Similar: isPow, prevPow, nextPow.
function isPow(x, n) // x: a number // n: base
const xmath = require('extra-math'); xmath.isPow(32, 2); // → true xmath.isPow(32, 4); // → false xmath.isPow(64, 4); // → true