Returns the natural logarithm of each data value described by the expression.
|tsExpression||Expression describing a constant or a time series of values to take the natural logarithm of.|
log() function produces a time series in which each data value is equal to the natural logarithm (log base e) of the value or values specified by the expression. The natural logarithm is the power to which you need to raise e to obtain the specified value. In mathematics,
loge can be written
tsExpressiondescribes a constant value
log()returns a continuous series where every data value is
tsExpressiondescribes one or more time series, then
log()returns a new time series for each input time series. Each value in a new time series is calculated as
loge V, where
Vis the value of the corresponding point in the input time series.
The inverse of this function is
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.
In this example, we see the result (in red) of using
log(4) to find the power of e that equals 4. We also see the result (in blue) of obtaining the inverse by applying the
exp() function to the result of
Here we see the result (in orange) of using
log() to take the natural log of a time series (in purple).