math.pow() function

The math.pow() function returns x**y, the base-x exponential of y.

Output data type: Float

import "math"

math.pow(x: 2.0, y: 3.0)

// Returns 8.0

Parameters

x

The X value used in the operation.

Data type: Float

y

The Y value used in the operation.

Data type: Float

Special cases

// In order of priority
math.pow(x:x, y:±0)     // Returns 1 for any x
math.pow(x:1, y:y)      // Returns 1 for any y
math.pow(x:X, y:1)      // Returns x for any x
math.pow(x:NaN, y:y)    // Returns NaN
math.pow(x:x, y:NaN)    // Returns NaN
math.pow(x:±0, y:y)     // Returns ±Inf for y an odd integer < 0
math.pow(x:±0, y:-Inf)  // Returns +Inf
math.pow(x:±0, y:+Inf)  // Returns +0
math.pow(x:±0, y:y)     // Returns +Inf for finite y < 0 and not an odd integer
math.pow(x:±0, y:y)     // Returns ±0 for y an odd integer > 0
math.pow(x:±0, y:y)     // Returns +0 for finite y > 0 and not an odd integer
math.pow(x:-1, y:±Inf)  // Returns 1
math.pow(x:x, y:+Inf)   // Returns +Inf for |x| > 1
math.pow(x:x, y:-Inf)   // Returns +0 for |x| > 1
math.pow(x:x, y:+Inf)   // Returns +0 for |x| < 1
math.pow(x:x, y:-Inf)   // Returns +Inf for |x| < 1
math.pow(x:+Inf, y:y)   // Returns +Inf for y > 0
math.pow(x:+Inf, y:y)   // Returns +0 for y < 0
math.pow(x:-Inf, y:y)   // Returns math.pow(-0, -y)
math.pow(x:x, y:y)      // Returns NaN for finite x < 0 and finite non-integer y

This documentation is open source. See a typo? Please, open an issue.


Need help getting up and running? Get Support