Skip to main content

Error

Trait Error 

Source
pub trait Error {
    // Required methods
    fn erf(self) -> Self;
    fn erfc(self) -> Self;
    fn erfinv(self) -> Self;
    fn erfcinv(self) -> Self;
}
Expand description

Required Methods§

Source

fn erf(self) -> Self

Error function

\operatorname{erf}(z) = \frac{2}{\sqrt\pi}\int_0^z e^{-t^2}\,dt.

For more information

§Arguments

self:

Source

fn erfc(self) -> Self

Complementary error function

\operatorname{erfc}(z) = 1 - \operatorname{erf}(z),
§Arguments

self

Source

fn erfinv(self) -> Self

Inverse error function

\operatorname{erfinv}(x) = \operatorname{erf}^{-1}(x) \quad \text{for} \quad x \in (-1, 1)

For more information

§Arguments

-1.0 < x < 1.0

§Panics

if x < -1.0 or x > 1.0

Source

fn erfcinv(self) -> Self

Inverse complementary error function

\operatorname{erfc}^{-1}(1-z) = \operatorname{erf}^{-1}(z)
§Arguments

0 <= x <= 2.0

§Panics

if x < 0.0 or x > 2.0

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Error for f32

Source§

fn erf(self) -> Self

Source§

fn erfc(self) -> Self

Source§

fn erfinv(self) -> Self

Source§

fn erfcinv(self) -> Self

Source§

impl Error for f64

Source§

fn erfinv(self) -> Self

https://en.wikipedia.org/wiki/Error_function#Inverse_functions Using the rational approximations tabulated in: J. M. Blair, C. A. Edwards, and J. H. Johnson, “Rational Chebyshev approximations for the inverse of the error function”,

Source§

fn erf(self) -> Self

Source§

fn erfc(self) -> Self

Source§

fn erfcinv(self) -> Self

Implementors§