Function pow
fn pow<T: Clone + One + Mul<T, Output = T>>(base: T, exp: usize) -> T
Raises a value to the power of exp, using exponentiation by squaring.
Note that 0⁰ (pow(0, 0)) returns 1. Mathematically this is undefined.
Example
use pow;
assert_eq!;
assert_eq!;
assert_eq!; // Be aware if this case affects you