Skip to main content

lcm_below

Function lcm_below 

Source
pub fn lcm_below(a: u64, b: u64, cap: u64) -> Option<u64>
Expand description

lcm(a, b) if it is below cap, else None. Positive a and b; the product is formed in u128, so the overflow check is exact: None exactly when the true lcm is at least cap. A result is a positive common multiple of a and b.