Expand description

WrappingPow and WrappingPowAssign, traits for raising a number to a power and wrapping at the boundary of the type.

wrapping_pow_assign

use malachite_base::num::arithmetic::traits::WrappingPowAssign;

let mut x = 3u8;
x.wrapping_pow_assign(3);
assert_eq!(x, 27);

let mut x = -10i32;
x.wrapping_pow_assign(9);
assert_eq!(x, -1000000000);

let mut x = -10i16;
x.wrapping_pow_assign(9);
assert_eq!(x, 13824);