Documentation

math.expm1() function

math.expm1() returns e**x - 1, the base-e exponential of x minus 1. It is more accurate than math.exp(x:x) - 1 when x is near zero.

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

Parameters

x

(Required) Value to operate on.

Examples

Get more accurate base-e exponentials for values near zero

import "math"

math.expm1(x: 0.022)// 0.022243784470438233

Use math.expm1 in map

import "math"

data
    |> map(fn: (r) => ({r with _value: math.expm1(x: r._value)}))

View example input and output


Was this page helpful?

Thank you for your feedback!


Linux Package Signing Key Rotation

All signed InfluxData Linux packages have been resigned with an updated key. If using Linux, you may need to update your package configuration to continue to download and verify InfluxData software packages.

For more information, see the Linux Package Signing Key Rotation blog post.