Skip to main content

gcd

Function gcd 

Source
pub fn gcd(a: u64, b: u64) -> u64
Expand description

The greatest common divisor of a and b (Euclid): it divides both, and every common divisor divides it. gcd(a, 0) == a, so folding from 0 gives the gcd of a list.