Return the value of 4 to the power of 3 (same as 4 * 4 * 4):
x = pow(4, 3)
Try it Yourself » Definition and UsageThe pow()
function returns the value of x to the power of y (xy).
If a third parameter is present, it returns x to the power of y, modulus z.
Syntax Parameter Values Parameter Description x A number, the base y A number, the exponent z Optional. A number, the modulus More Examples ExampleReturn the value of 4 to the power of 3, modulus 5 (same as (4 * 4 * 4) % 5):
x = pow(4, 3, 5)
Try it Yourself »Track your progress - it's free!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4