Trait OverflowingPowAssign

Source
pub trait OverflowingPowAssign<RHS = Self> {
    // Required method
    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§

Source

fn overflowing_pow_assign(&mut self, exp: RHS) -> bool

Implementations on Foreign Types§

Source§

impl OverflowingPowAssign for u64

Source§

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.

Source§

impl OverflowingPowAssign<u64> for i8

Source§

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.

Source§

impl OverflowingPowAssign<u64> for i16

Source§

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.

Source§

impl OverflowingPowAssign<u64> for i32

Source§

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.

Source§

impl OverflowingPowAssign<u64> for i64

Source§

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.

Source§

impl OverflowingPowAssign<u64> for i128

Source§

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.

Source§

impl OverflowingPowAssign<u64> for isize

Source§

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.

Source§

impl OverflowingPowAssign<u64> for u8

Source§

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.

Source§

impl OverflowingPowAssign<u64> for u16

Source§

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.

Source§

impl OverflowingPowAssign<u64> for u32

Source§

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.

Source§

impl OverflowingPowAssign<u64> for u128

Source§

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.

Source§

impl OverflowingPowAssign<u64> for usize

Source§

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.

Implementors§