Documentation

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

New! Cloud or OSS?

InfluxDB OSS 2.0 now generally available!

InfluxDB OSS 2.0 is now generally available and ready for production use. See the InfluxDB OSS 2.0 release notes.

For information about upgrading to InfluxDB OSS 2.0, see: