Function lcm
Source pub fn lcm(left: u64, right: u64) -> u64
Expand description
Computes the least common multiple of two unsigned integers.
lcm(a, 0) returns 0.
§Panics
Panics when the exact least common multiple does not fit in u64.
§Examples
use use_arithmetic::lcm;
assert_eq!(lcm(6, 15), 30);
assert_eq!(lcm(0, 15), 0);