pub fn times<T>(a: T, p: u64) -> T where
    T: Sized + Zero + for<'x> AddAssign<&'x T>,
    for<'x> &'x T: Add<Output = T>, 
Expand description

calcurate $pa$ with mutliprecation by doubling

use ring_algorithm::times;
assert_eq!(times::<i32>(2, 16), 32);