We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Finds previous power-of-2. 📦 😺 🏃 📼 🌔 📜 📰 📘
Similar: log2, pow2, isPow2, nextPow2, prevPow2.
integer.prevPow2(x); // x: an int32
const integer = require("extra-integer"); integer.prevPow2(63); // 32 integer.prevPow2(128); // 128 integer.prevPow2(1); // 1