MCPcopy Index your code
hub / github.com/RustPython/RustPython / gcd

Function gcd

Lib/test/test_binop.py:7–11  ·  view source on GitHub ↗

Greatest common divisor using Euclid's algorithm.

(a, b)

Source from the content-addressed store, hash-verified

5from abc import ABCMeta
6
7def gcd(a, b):
8 """Greatest common divisor using Euclid's algorithm."""
9 while a:
10 a, b = b%a, a
11 return b
12
13def isint(x):
14 """Test whether an object is an instance of int."""

Callers 3

__init__Method · 0.70
test_gcdMethod · 0.70
testGcdMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected