qit.utils.gcd

qit.utils.gcd(a, b)

Greatest common divisor.

Parameters
  • a (int) – integer

  • b (int) – integer

Returns

largest positive integer that divides both a and b

Return type

int

Uses the Euclidean algorithm.