Trait malachite_base::num::arithmetic::traits::ShlRoundAssign
source · [−]pub trait ShlRoundAssign<RHS> {
fn shl_round_assign(&mut self, other: RHS, rm: RoundingMode);
}
Expand description
Left-shifts a number (multiplies it by a power of 2) in place, rounding the result according to a specified rounding mode.
Rounding might only be necessary if other
is negative.
Required Methods
fn shl_round_assign(&mut self, other: RHS, rm: RoundingMode)
Implementations on Foreign Types
sourceimpl ShlRoundAssign<i8> for u8
impl ShlRoundAssign<i8> for u8
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for u8
impl ShlRoundAssign<i16> for u8
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for u8
impl ShlRoundAssign<i32> for u8
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for u8
impl ShlRoundAssign<i64> for u8
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for u8
impl ShlRoundAssign<i128> for u8
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for u8
impl ShlRoundAssign<isize> for u8
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for u16
impl ShlRoundAssign<i8> for u16
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for u16
impl ShlRoundAssign<i16> for u16
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for u16
impl ShlRoundAssign<i32> for u16
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for u16
impl ShlRoundAssign<i64> for u16
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for u16
impl ShlRoundAssign<i128> for u16
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for u16
impl ShlRoundAssign<isize> for u16
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for u32
impl ShlRoundAssign<i8> for u32
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for u32
impl ShlRoundAssign<i16> for u32
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for u32
impl ShlRoundAssign<i32> for u32
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for u32
impl ShlRoundAssign<i64> for u32
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for u32
impl ShlRoundAssign<i128> for u32
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for u32
impl ShlRoundAssign<isize> for u32
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for u64
impl ShlRoundAssign<i8> for u64
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for u64
impl ShlRoundAssign<i16> for u64
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for u64
impl ShlRoundAssign<i32> for u64
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for u64
impl ShlRoundAssign<i64> for u64
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for u64
impl ShlRoundAssign<i128> for u64
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for u64
impl ShlRoundAssign<isize> for u64
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for u128
impl ShlRoundAssign<i8> for u128
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for u128
impl ShlRoundAssign<i16> for u128
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for u128
impl ShlRoundAssign<i32> for u128
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for u128
impl ShlRoundAssign<i64> for u128
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for u128
impl ShlRoundAssign<i128> for u128
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for u128
impl ShlRoundAssign<isize> for u128
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for usize
impl ShlRoundAssign<i8> for usize
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for usize
impl ShlRoundAssign<i16> for usize
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for usize
impl ShlRoundAssign<i32> for usize
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for usize
impl ShlRoundAssign<i64> for usize
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for usize
impl ShlRoundAssign<i128> for usize
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for usize
impl ShlRoundAssign<isize> for usize
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for i8
impl ShlRoundAssign<i8> for i8
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for i8
impl ShlRoundAssign<i16> for i8
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for i8
impl ShlRoundAssign<i32> for i8
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for i8
impl ShlRoundAssign<i64> for i8
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for i8
impl ShlRoundAssign<i128> for i8
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for i8
impl ShlRoundAssign<isize> for i8
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for i16
impl ShlRoundAssign<i8> for i16
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for i16
impl ShlRoundAssign<i16> for i16
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for i16
impl ShlRoundAssign<i32> for i16
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for i16
impl ShlRoundAssign<i64> for i16
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for i16
impl ShlRoundAssign<i128> for i16
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for i16
impl ShlRoundAssign<isize> for i16
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for i32
impl ShlRoundAssign<i8> for i32
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for i32
impl ShlRoundAssign<i16> for i32
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for i32
impl ShlRoundAssign<i32> for i32
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for i32
impl ShlRoundAssign<i64> for i32
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for i32
impl ShlRoundAssign<i128> for i32
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for i32
impl ShlRoundAssign<isize> for i32
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for i64
impl ShlRoundAssign<i8> for i64
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for i64
impl ShlRoundAssign<i16> for i64
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for i64
impl ShlRoundAssign<i32> for i64
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for i64
impl ShlRoundAssign<i64> for i64
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for i64
impl ShlRoundAssign<i128> for i64
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for i64
impl ShlRoundAssign<isize> for i64
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for i128
impl ShlRoundAssign<i8> for i128
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for i128
impl ShlRoundAssign<i16> for i128
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for i128
impl ShlRoundAssign<i32> for i128
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for i128
impl ShlRoundAssign<i64> for i128
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for i128
impl ShlRoundAssign<i128> for i128
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for i128
impl ShlRoundAssign<isize> for i128
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i8> for isize
impl ShlRoundAssign<i8> for isize
sourcefn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i8, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i16> for isize
impl ShlRoundAssign<i16> for isize
sourcefn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i16, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i32> for isize
impl ShlRoundAssign<i32> for isize
sourcefn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i32, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i64> for isize
impl ShlRoundAssign<i64> for isize
sourcefn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i64, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<i128> for isize
impl ShlRoundAssign<i128> for isize
sourcefn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: i128, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.
sourceimpl ShlRoundAssign<isize> for isize
impl ShlRoundAssign<isize> for isize
sourcefn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
fn shl_round_assign(&mut self, bits: isize, rm: RoundingMode)
Left-shifts a number (multiplies it by a power of 2 or divides it by a power of 2 and takes the floor) and rounds according to the specified rounding mode, in place.
Passing RoundingMode::Floor
or RoundingMode::Down
is equivalent to
using >>
. To test whether RoundingMode::Exact
can be passed, use
bits > 0 || self.divisible_by_power_of_2(bits)
. Rounding might only be
necessary if bits
is negative.
See the ShlRound
documentation for details.
Worst-case complexity
Constant time and additional memory.
Panics
Panics if bits
is positive and rm
is RoundingMode::Exact
but self
is
not divisible by $2^b$.
Examples
See here.