Function extprim::traits::pow
[−]
[src]
pub fn pow<T: Copy + One + MulAssign>(base: T, exp: u32) -> T
Raise base
to the power of exp
, using exponentiation by squaring.
Examples
use extprim::traits::pow; assert_eq!(pow(10u64, 7), 10000000u64);