Function std::num::pow
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
use std::num; assert_eq!(num::pow(2, 4), 16);
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.
use std::num; assert_eq!(num::pow(2, 4), 16);
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).