Returns the logarithm base 2 of each data value described by the expression.
|tsExpression||Expression describing a constant or a time series of values to take the logarithm of.|
log2() function produces a time series in which each data value is equal to the binary logarithm (log base 2) of the value or values specified by the expression. The binary logarithm is the power to which you need to raise 2 to obtain the value of the expression.
tsExpressiondescribes a constant value
log2()returns a continuous series where every data value is
tsExpressiondescribes one or more time series, then
log2()returns a new time series for each input time series. Each value in a new time series is calculated as
log2 V, where
Vis the value of the corresponding point in the input time series.
By default, the chart legend displays a rounded version of the result. You can cause the legend to display the result with more precision by holding down the shift key when you hover over the time series.
Here we see the result (in orange) of using
log2() to take the binary log of a time series (in purple).