Trait opendp::traits::InfLog2

source ·
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§

source

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).

source

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.

Implementations on Foreign Types§

source§

impl InfLog2 for f32

source§

fn inf_log2(self) -> Fallible<Self>

source§

fn neg_inf_log2(self) -> Fallible<Self>

source§

impl InfLog2 for f64

source§

fn inf_log2(self) -> Fallible<Self>

source§

fn neg_inf_log2(self) -> Fallible<Self>

Implementors§