pub trait InfExpM1: Sized {
    // Required methods
    fn inf_exp_m1(self) -> Fallible<Self>;
    fn neg_inf_exp_m1(self) -> Fallible<Self>;
}
Expand description

Fallibly exponentiate and subtract one with specified rounding.

Throws an error if the ideal output is not finite or representable. This provides more numerical stability than computing the quantity outright.

Required Methods§

source

fn inf_exp_m1(self) -> Fallible<Self>

Proof Definition

For any self of type Self, self.inf_exp_m1() either returns Ok(out), where $out \ge \exp(self) - 1$, or Err(e).

source

fn neg_inf_exp_m1(self) -> Fallible<Self>

Proof Definition

For any self of type Self, self.neg_inf_exp_m1() either returns Ok(out), where $out \le \exp(self) - 1$, or Err(e).

Implementations on Foreign Types§

source§

impl InfExpM1 for f64

source§

fn inf_exp_m1(self) -> Fallible<Self>

source§

fn neg_inf_exp_m1(self) -> Fallible<Self>

source§

impl InfExpM1 for f32

source§

fn inf_exp_m1(self) -> Fallible<Self>

source§

fn neg_inf_exp_m1(self) -> Fallible<Self>

Implementors§