Exponentiation

Syntax

1
x ** y
Copied!

Explanation

The exponentiation operator raises the first operand to the power of the second. It is right associative meaning:
1
x ** y ** z == x ** (y ** z)
Copied!

Examples

1
2 ** 4 // 16
2
2 ** -3 // 0.125
3
-2 ** 3 // -8
4
16 ** .5 // 4
Copied!
Last modified 1yr ago
Copy link