Module malachite_base::num::arithmetic::overflowing_div
source · Expand description
OverflowingDiv
and
OverflowingDivAssign
, traits for dividing two numbers and
returning a boolean indicating whether an overflow occurred.
§overflowing_div_assign
use malachite_base::num::arithmetic::traits::OverflowingDivAssign;
let mut x = 100u16;
assert_eq!(x.overflowing_div_assign(3), false);
assert_eq!(x, 33);
let mut x = -128i8;
assert_eq!(x.overflowing_div_assign(-1), true);
assert_eq!(x, -128);