The base number.
The exponent to raise the base to.
The result of raising the base to the exponent.
const result = pow(2, 3);
console.log(result);
// Output: 8
Calculates the power of a bigint to the specified exponent.
The base bigint.
The exponent to raise the base to.
The result of raising the base to the exponent.
const result = pow(BigInt(2), 3);
console.log(result);
// Output: 8n
Calculates the power of a value to the specified exponent using a custom numerical implementation.
The type of the base value.
The base value.
The exponent to raise the base to.
Optional
numerical: Numerical<T>The numerical implementation to use.
The result of raising the base to the exponent.
Throws an error if no appropriate numerical implementation is provided.
const result = pow(2, 3, new NumericalNumber());
console.log(result);
// Output: 8
Generated using TypeDoc
Calculates the power of a number to the specified exponent.