pub trait LowPrecisionDivision {
    // Required methods
    fn checked_div_30bit_precision(&self, rhs: I80F48) -> Option<I80F48>;
    fn checked_div_f64_precision(&self, rhs: I80F48) -> Option<I80F48>;
}

Required Methods§

Implementations on Foreign Types§

source§

impl LowPrecisionDivision for I80F48

source§

fn checked_div_30bit_precision(&self, rhs: I80F48) -> Option<I80F48>

Divide by taking the top 64 bits of self, and top 32 bits of rhs. Then divide those as u64 and shift everything back. Leads to a division result that has the first 30 bits correct.

source§

fn checked_div_f64_precision(&self, rhs: I80F48) -> Option<I80F48>

Convert to f64 and divide those.

Implementors§