math.remainder() function

The math.remainder() function returns the IEEE 754 floating-point remainder of x / y.

Output data type: Float

import "math"

math.remainder(x: 21.0, y: 4.0)

// Returns 1.0



The numerator used in the operation.

Data type: Float


The denominator used in the operation.

Data type: Float

Special cases

math.remainder(x: ±Inf, y:y)  // Returns NaN
math.remainder(x: NaN, y:y)   // Returns NaN
math.remainder(x:x, y: 0)     // Returns NaN
math.remainder(x:x, y: ±Inf)  // Returns x
math.remainder(x:x, y: NaN)   // Returns NaN

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: