ipow
ipow(
base,exponent):number|null
Defined in: packages/core/src/number/integer/ipow.ts:14
Exact integer power by square-and-multiply, completing Math.pow/**, which
go through floats and stop being exact well before the safe-integer limit.
O(log exponent) multiplications.
Parameters
Section titled “Parameters”number
An integer base.
exponent
Section titled “exponent”number
A non-negative integer exponent.
Returns
Section titled “Returns”number | null
base ** exponent, or null when the exact result is not a safe
integer — the same overflow signal ipow10 uses.
Throws
Section titled “Throws”When base is not an integer, or exponent is negative
or not an integer.