math.nextafter() function

The math.nextafter() function returns the next representable float value after x towards y.

Output data type: Float

import "math"

math.nextafter(x: 1.23, y: 4.56)

// Returns 1.2300000000000002



The X value used in the operation.


The Y value used in the operation.

Special cases

math.nextafter(x:x, y:x)    // Returns x
math.nextafter(x: NaN, y:y) // Returns NaN
math.nextafter(x:x, y:NaN)  // Returns NaN

Was this page helpful?

Thank you for your feedback!

Upgrade to InfluxDB Cloud or InfluxDB 2.0!

InfluxDB Cloud and InfluxDB OSS 2.0 ready for production.