Skip to main content

round_digits

Function round_digits 

Source
fn round_digits(digits: &mut Vec<u8>, e: &mut i32, keep: i64)
Expand description

Rounds d₁.d₂… × 10ᵉ to keep significant digits, half to even, and drops trailing zeros. keep ≤ 0 rounds at or above the first digit; the result may be zero (no digits).