math.mInf() function

math.mInf() returns positive infinity if sign >= 0, negative infinity if sign < 0.

Function type signature
(sign: int) => float
For more information, see Function type signatures.



(Required) Value to operate on.


Return an infinity float value from a positive or negative sign value

import "math"

math.mInf(sign: 1)// +Inf

Use math.mInf in map

import "sampledata"
import "math"
    |> map(fn: (r) => ({r with _value: math.mInf(sign: r._value)}))

View example input and output

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.