Trait PowAssign

Source
pub trait PowAssign<RHS = Self> {
    // Required method
    fn pow_assign(&mut self, exp: RHS);
}
Expand description

Raises a number to a power in place. Assumes the result is representable.

Required Methods§

Source

fn pow_assign(&mut self, exp: RHS)

Implementations on Foreign Types§

Source§

impl PowAssign for f32

Source§

fn pow_assign(&mut self, exp: f32)

Raises a number to a power, in place.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl PowAssign for f64

Source§

fn pow_assign(&mut self, exp: f64)

Raises a number to a power, in place.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl PowAssign for u64

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<i64> for f32

Source§

fn pow_assign(&mut self, exp: i64)

Raises a number to a power, in place.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl PowAssign<i64> for f64

Source§

fn pow_assign(&mut self, exp: i64)

Raises a number to a power, in place.

§Worst-case complexity

Constant time and additional memory.

§Examples

See here.

Source§

impl PowAssign<u64> for i8

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for i16

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for i32

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for i64

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for i128

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for isize

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for u8

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for u16

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for u32

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for u128

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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 PowAssign<u64> for usize

Source§

fn pow_assign(&mut self, exp: u64)

Raises a number to a power, in place.

§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§