Trait malachite_base::num::arithmetic::traits::ShrRoundAssign

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

Right-shifts a number (divides 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 positive.

Required Methods§

source

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

Implementations on Foreign Types§

source§

impl ShrRoundAssign<i8> for i8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for i16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for i32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for i64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for i128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for isize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for u8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for u16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for u32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for u64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for u128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i8> for usize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for i8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for i16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for i32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for i64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for i128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for isize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for u8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for u16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for u32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for u64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for u128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i16> for usize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for i8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for i16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for i32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for i64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for i128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for isize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for u8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for u16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for u32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for u64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for u128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i32> for usize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for i8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for i16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for i32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for i64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for i128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for isize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for u8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for u16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for u32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for u64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for u128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i64> for usize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for i8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for i16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for i32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for i64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for i128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for isize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for u8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for u16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for u32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for u64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for u128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<i128> for usize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for i8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for i16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for i32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for i64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for i128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for isize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for u8

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for u16

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for u32

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for u64

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for u128

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<isize> for usize

source§

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

Shifts a number right (divides it by a power of 2) 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 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 self.divisible_by_power_of_2(bits). Rounding might only be necessary if bits is non-negative.

See the ShrRound 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 ShrRoundAssign<u8> for i8

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for i16

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for i32

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for i64

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for i128

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for isize

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for u8

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for u16

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for u32

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for u64

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for u128

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u8> for usize

source§

fn shr_round_assign(&mut self, bits: u8, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for i8

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for i16

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for i32

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for i64

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for i128

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for isize

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for u8

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for u16

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for u32

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for u64

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for u128

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u16> for usize

source§

fn shr_round_assign(&mut self, bits: u16, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for i8

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for i16

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for i32

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for i64

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for i128

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for isize

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for u8

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for u16

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for u32

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for u64

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for u128

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u32> for usize

source§

fn shr_round_assign(&mut self, bits: u32, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for i8

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for i16

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for i32

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for i64

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for i128

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for isize

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for u8

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for u16

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for u32

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for u64

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for u128

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u64> for usize

source§

fn shr_round_assign(&mut self, bits: u64, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for i8

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for i16

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for i32

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for i64

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for i128

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for isize

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for u8

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for u16

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for u32

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for u64

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for u128

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<u128> for usize

source§

fn shr_round_assign(&mut self, bits: u128, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for i8

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for i16

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for i32

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for i64

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for i128

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for isize

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) and rounds according to the specified rounding mode, in place. An Ordering isreturned, indicating whether the assigned value is less than, equal to, or greater than the exact value.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for u8

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for u16

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for u32

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for u64

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for u128

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

source§

impl ShrRoundAssign<usize> for usize

source§

fn shr_round_assign(&mut self, bits: usize, rm: RoundingMode) -> Ordering

Shifts a number right (divides it by a power of 2) 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.

Passing RoundingMode::Floor or RoundingMode::Down is equivalent to using >>. To test whether RoundingMode::Exact can be passed, use self.divisible_by_power_of_2(bits).

See the ShrRound documentation for details.

§Worst-case complexity

Constant time and additional memory.

§Panics

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

§Examples

See here.

Implementors§