Trait malachite_base::num::arithmetic::traits::OverflowingPowAssign
source · [−]pub trait OverflowingPowAssign<RHS = Self> {
fn overflowing_pow_assign(&mut self, exp: RHS) -> bool;
}
Expand description
Raises a number to a power in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped number is assigned.
Required Methods
fn overflowing_pow_assign(&mut self, exp: RHS) -> bool
Implementations on Foreign Types
sourceimpl OverflowingPowAssign<u64> for u8
impl OverflowingPowAssign<u64> for u8
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for u16
impl OverflowingPowAssign<u64> for u16
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for u32
impl OverflowingPowAssign<u64> for u32
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for u64
impl OverflowingPowAssign<u64> for u64
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for u128
impl OverflowingPowAssign<u64> for u128
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for usize
impl OverflowingPowAssign<u64> for usize
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for i8
impl OverflowingPowAssign<u64> for i8
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for i16
impl OverflowingPowAssign<u64> for i16
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for i32
impl OverflowingPowAssign<u64> for i32
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for i64
impl OverflowingPowAssign<u64> for i64
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for i128
impl OverflowingPowAssign<u64> for i128
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.
sourceimpl OverflowingPowAssign<u64> for isize
impl OverflowingPowAssign<u64> for isize
sourcefn overflowing_pow_assign(&mut self, exp: u64) -> bool
fn overflowing_pow_assign(&mut self, exp: u64) -> bool
Raises a number to a power, in place.
Returns a boolean indicating whether an arithmetic overflow occurred. If an overflow occurred, then the wrapped value is assigned.
Worst-case complexity
$T(n) = O(n)$
$M(n) = O(1)$
where $T$ is time, $M$ is additional memory, and $n$ is exp.significant_bits()
.
Examples
See here.