galois.gcd

galois.gcd(a, b)

Finds the greatest common divisor of the integers \(a\) and \(b\).

Parameters
  • a (int) – Any integer.

  • b (int) – Any integer.

Returns

Greatest common divisor of \(a\) and \(b\).

Return type

int

Examples

In [1]: a = 12

In [2]: b = 28

In [3]: galois.gcd(a, b)
Out[3]: 4