Skip to main content

exp

Function exp 

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

The natural exponential function. It raises the mathematical constant e to the power of x and returns it.

e has an approximate value of 2.71828, and can be obtained with exp(1).

For exponents to other bases use the method [method pow].

var a = exp(2) # Approximately 7.39