Function num::powExperimental [-]  [+] [src]

pub fn pow<T: One + Mul<T, T>>(base: T, exp: uint) -> T

Raises a value to the power of exp, using exponentiation by squaring.

Example

extern crate num; fn main() { use num; assert_eq!(num::pow(2i, 4), 16); }
use num;

assert_eq!(num::pow(2i, 4), 16);