pub trait InfLog2: Sized {
// Required methods
fn inf_log2(self) -> Fallible<Self>;
fn neg_inf_log2(self) -> Fallible<Self>;
}
Expand description
Fallible base-2 logarithm with specified rounding.
Throws an error if the ideal output is not finite or representable.
Required Methods§
sourcefn inf_log2(self) -> Fallible<Self>
fn inf_log2(self) -> Fallible<Self>
Proof Definition
For any self
of type Self
,
self.inf_log2()
either returns Ok(out)
,
where $out \ge \log_2(self)$, or Err(e)
.
sourcefn neg_inf_log2(self) -> Fallible<Self>
fn neg_inf_log2(self) -> Fallible<Self>
Proof Definition
For any self
of type Self
,
self.neg_inf_log2()
either returns Ok(out)
,
where $out \le \log_2(self)$, or Err(e)
.
Object Safety§
This trait is not object safe.