pub fn lcm<T: SignedInteger>(a: T, b: T) -> T
Expand description
Computes the lowest common multiple (LCM).
ยงExamples
assert_eq!(lcm(6, 4), 12);
assert_eq!(lcm(21, 6), 42);
pub fn lcm<T: SignedInteger>(a: T, b: T) -> T
Computes the lowest common multiple (LCM).
assert_eq!(lcm(6, 4), 12);
assert_eq!(lcm(21, 6), 42);