pow()
Raises to a power (base to the power of exponent).
Syntax
pow(base, exponent)
Description
Same as base ** exponent. If a third argument is given, it takes the modulus: pow(a, b, m).
Returns
The exponentiated result.
Example
Loading editor…
Expected output
1024 8
When to use?
Exponential growth, squaring/cubing, cryptographic modular operations.