pub fn add_times<T, U>(b: T, a: T, p: U) -> T
Expand description
calcurate $b + pa
$ with mutliprecation by doubling
This function doesn’t require T: num_traits::Zero
.
use ring_algorithm::add_times;
assert_eq!(add_times::<i32, u64>(3, 2, 7), 17);