Skip to main content

error_fc

Function error_fc 

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

Returns the complementary error function erfc(x) = 1 − erf(x).

Computed directly (not as 1 - error_f(x)) so the small right-tail values stay accurate to ~15 digits. CDFLIB exposes this and the scaled variant error_fc_scaled via a single int *ind flag; we split them into two Rust functions for clarity.

§Example

use cdflib::special::error_fc;

let y = error_fc(2.0);
assert!((y - 0.00467773).abs() < 1e-8);