We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Find largest power-of-10 less than or equal to given bigint.
Similar: prevPow2, prevPow10. Similar: isPow10, prevPow10, nextPow10.
function prevPow10(x) // x: a bigint
const xbigint = require('extra-bigint'); xbigint.prevPow10(10n); // → 10n xbigint.prevPow10(999n); // → 100n