Skip to main content

log

Function log 

pub fn log(x: f64) -> f64
Expand description

Returns the natural logarithm of x (base e, with e being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth.

Note: This is not the same as the “log” function on most calculators, which uses a base 10 logarithm. To use base 10 logarithm, use log(x) / log(10).

log(10) # Returns 2.302585

Note: The logarithm of 0 returns -inf, while negative values return -nan.