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
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)}))
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.