math.exp2() function

The math.exp2() function returns 2**x, the base-2 exponential of x.

Output data type: Float

import "math"

math.exp2(x: 21.0)

// Returns 2.097152e+06



The value used in the operation.

Data type: Float

Special cases

math.exp2(x: +Inf) // Returns +Inf
math.exp2(x: NaN)  // Returns NaN

Very large values overflow to 0 or +Inf. Very small values underflow to 1.

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: