Trait malachite_base::num::arithmetic::traits::OverflowingSubMulAssign
source · [−]pub trait OverflowingSubMulAssign<Y = Self, Z = Self> {
fn overflowing_sub_mul_assign(&mut self, y: Y, z: Z) -> bool;
}
Expand description
Subtracts a number by the product of two other numbers, in place.
Returns a tuple of the result along with a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped number is returned.
Required Methods
fn overflowing_sub_mul_assign(&mut self, y: Y, z: Z) -> bool
Implementations on Foreign Types
sourceimpl OverflowingSubMulAssign<u8, u8> for u8
impl OverflowingSubMulAssign<u8, u8> for u8
sourcefn overflowing_sub_mul_assign(&mut self, y: u8, z: u8) -> bool
fn overflowing_sub_mul_assign(&mut self, y: u8, z: u8) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<u16, u16> for u16
impl OverflowingSubMulAssign<u16, u16> for u16
sourcefn overflowing_sub_mul_assign(&mut self, y: u16, z: u16) -> bool
fn overflowing_sub_mul_assign(&mut self, y: u16, z: u16) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<u32, u32> for u32
impl OverflowingSubMulAssign<u32, u32> for u32
sourcefn overflowing_sub_mul_assign(&mut self, y: u32, z: u32) -> bool
fn overflowing_sub_mul_assign(&mut self, y: u32, z: u32) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<u64, u64> for u64
impl OverflowingSubMulAssign<u64, u64> for u64
sourcefn overflowing_sub_mul_assign(&mut self, y: u64, z: u64) -> bool
fn overflowing_sub_mul_assign(&mut self, y: u64, z: u64) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<u128, u128> for u128
impl OverflowingSubMulAssign<u128, u128> for u128
sourcefn overflowing_sub_mul_assign(&mut self, y: u128, z: u128) -> bool
fn overflowing_sub_mul_assign(&mut self, y: u128, z: u128) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<usize, usize> for usize
impl OverflowingSubMulAssign<usize, usize> for usize
sourcefn overflowing_sub_mul_assign(&mut self, y: usize, z: usize) -> bool
fn overflowing_sub_mul_assign(&mut self, y: usize, z: usize) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<i8, i8> for i8
impl OverflowingSubMulAssign<i8, i8> for i8
sourcefn overflowing_sub_mul_assign(&mut self, y: i8, z: i8) -> bool
fn overflowing_sub_mul_assign(&mut self, y: i8, z: i8) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<i16, i16> for i16
impl OverflowingSubMulAssign<i16, i16> for i16
sourcefn overflowing_sub_mul_assign(&mut self, y: i16, z: i16) -> bool
fn overflowing_sub_mul_assign(&mut self, y: i16, z: i16) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<i32, i32> for i32
impl OverflowingSubMulAssign<i32, i32> for i32
sourcefn overflowing_sub_mul_assign(&mut self, y: i32, z: i32) -> bool
fn overflowing_sub_mul_assign(&mut self, y: i32, z: i32) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<i64, i64> for i64
impl OverflowingSubMulAssign<i64, i64> for i64
sourcefn overflowing_sub_mul_assign(&mut self, y: i64, z: i64) -> bool
fn overflowing_sub_mul_assign(&mut self, y: i64, z: i64) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<i128, i128> for i128
impl OverflowingSubMulAssign<i128, i128> for i128
sourcefn overflowing_sub_mul_assign(&mut self, y: i128, z: i128) -> bool
fn overflowing_sub_mul_assign(&mut self, y: i128, z: i128) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.
sourceimpl OverflowingSubMulAssign<isize, isize> for isize
impl OverflowingSubMulAssign<isize, isize> for isize
sourcefn overflowing_sub_mul_assign(&mut self, y: isize, z: isize) -> bool
fn overflowing_sub_mul_assign(&mut self, y: isize, z: isize) -> bool
Subtracts a number by the product of two other numbers, in place.
Returns a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred, then the wrapped value is assigned.
Worst-case complexity
Constant time and additional memory.
Examples
See here.