math.ilogb() function

The math.ilogb() function returns the binary exponent of x as an integer.

Output data type: Integer

import "math"

math.ilogb(x: 123.45)

// Returns  6.0



The value used in the operation.

Data type: Float

Special cases

math.ilogb(x: ±Inf) // Returns MaxInt32
math.ilogb(x: 0)    // Returns MinInt32
math.ilogb(x: NaN)  // Returns MaxInt32

New! Cloud or OSS?

InfluxDB OSS 2.0 release candidate

InfluxDB OSS v2.0.rc includes breaking changes that require a manual upgrade from all alpha and beta versions. For information, see:

Upgrade to InfluxDB OSS v2.0.rc