math.pow()

Type Function
Library math.*
Return value Number
Revision Release 2024.3703
Keywords pow, power, exponent
See also math.exp()
math.log()

Overview

Returns x^y^. (You can also use the expression x^y to compute this value.)

Syntax

math.pow( x, y )
x (required)

Number. The base.

y (required)

Number. The exponent.

Examples

print(math.pow(100,0))  ---->  1
print(math.pow(7,2))    ---->  49
print(math.pow(2,8))    ---->  256