Trait malachite_base::num::arithmetic::traits::ShlRoundAssign

source ·
pub trait ShlRoundAssign<RHS> {
    // Required method
    fn shl_round_assign(&mut self, other: RHS, rm: RoundingMode) -> Ordering;
}
Expand description

Left-shifts a number (multiplies it by a power of 2) in place, rounding the result according to a specified rounding mode. An Ordering is also returned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Rounding might only be necessary if other is negative.

Required Methods§

source

fn shl_round_assign(&mut self, other: RHS, rm: RoundingMode) -> Ordering

Implementations on Foreign Types§

source§

impl ShlRoundAssign<i8> for i8

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for i16

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for i32

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for i64

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for i128

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for isize

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for u8

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for u16

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for u32

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for u64

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for u128

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i8> for usize

source§

fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for i8

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for i16

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for i32

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for i64

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for i128

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for isize

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for u8

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for u16

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for u32

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for u64

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for u128

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i16> for usize

source§

fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for i8

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for i16

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for i32

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for i64

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for i128

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for isize

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for u8

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for u16

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for u32

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for u64

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for u128

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i32> for usize

source§

fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for i8

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for i16

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for i32

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for i64

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for i128

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for isize

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for u8

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for u16

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for u32

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for u64

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for u128

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i64> for usize

source§

fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for i8

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for i16

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for i32

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for i64

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for i128

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for isize

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for u8

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for u16

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for u32

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for u64

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for u128

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<i128> for usize

source§

fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for i8

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for i16

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for i32

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for i64

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for i128

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for isize

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for u8

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for u16

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for u32

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for u64

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for u128

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

source§

impl ShlRoundAssign<isize> for usize

source§

fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode) -> Ordering

Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place. An Ordering is returned, indicating whether the assigned value is less than, equal to, or greater than the exact value. If bits is non-negative, then the returned Ordering is always Equal, even if the higher bits of the result are lost.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use bits > 0 || self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is negative.

See the ShlRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

Panics if bits is positive and rm is RoundingMode::Exact but self is not divisible by $2^b$.

§Examples

See here.

Implementors§