math.log2() function
math.log2()
is a function returns the binary logarithm of x
.
Function type signature
(x: float) => float
Parameters
x
(Required) the value used in the operation.
Examples
Return the binary logarithm of a value
import "math"
math.log2(x: 3.14)// 1.6507645591169022
Use math.log2 in map
import "sampledata"
import "math"
sampledata.float()
|> map(fn: (r) => ({r with _value: math.log2(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.