Function ruint::algorithms::mul
source · [−]Expand description
⚠️ Computes result += lhs * rhs
and checks for overflow.
Warning. This function is not part of the stable API.
Arrays are in little-endian order. All arrays can be arbitrary sized.
Algorithm
Uses the schoolbook multiplication algorithm.
Examples
let mut result = [0];
let overflow = mul(&[3], &[4], &mut result);
assert_eq!(overflow, false);
assert_eq!(result, [12]);