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§
sourcefn inf_exp_m1(self) -> Fallible<Self>
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)
.
sourcefn neg_inf_exp_m1(self) -> Fallible<Self>
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)
.
Object Safety§
This trait is not object safe.