Function std::num::pow_with_uint

pub fn pow_with_uint<T: NumCast + One + Zero + Div<T, T> + Mul<T, T>>(radix: uint, pow: uint) -> T

Calculates a power to a given radix, optimized for uint pow and radix.

Returns radix^pow as T.

Note: Also returns 1 for 0^0, despite that technically being an undefined number. The reason for this is twofold: - If code written to use this function cares about that special case, it's probably going to catch it before making the call. - If code written to use this function doesn't care about it, it's probably assuming that x^0 always equals 1.