Skip to main content

error_f

Function error_f 

Source
pub fn error_f(x: f64) -> f64
Expand description

Returns the error function erf(x) = (2/√π) ∫₀ˣ e⁻² dt.

§Example

use cdflib::special::error_f;

let y = error_f(0.8);
assert!((y - 0.74210096).abs() < 1e-8);