[][src]Function fast_math::exp

pub fn exp(x: f32) -> f32

Compute a fast approximation to ex.

The maximum relative error for inputs for which the result is normal (x ≥ -128 ln 2 ≈ -88.7) is less than 0.011. For x < -128 ln 2, the relative error in the (subnormal) result can be as large as 1.

If x is NaN, exp returns NaN.

See also exp_raw which only works on -104 ≤ x ≤ 104, but is % faster.