Trait dashu_float::round::Round
source · [−]pub trait Round: Copy {
type Reverse: Round;
fn round_low_part<F: FnOnce() -> Ordering>(
integer: &IBig,
low_sign: Sign,
low_half_test: F
) -> Rounding;
fn round_fract<const B: Word>(
integer: &IBig,
fract: IBig,
precision: usize
) -> Rounding { ... }
fn round_ratio(integer: &IBig, num: IBig, den: &IBig) -> Rounding { ... }
}
Expand description
A trait describing the rounding strategy
Required Associated Types
Required Methods
Provided Methods
Calculate the rounding of the number (integer + fract / X^precision), assuming |fract| / X^precision < 1. Return the adjustment.