MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / simplify

Function simplify

ar.py:38–40  ·  view source on GitHub ↗
(n: int, d: int)

Source from the content-addressed store, hash-verified

36
37
38def simplify(n: int, d: int) -> tuple[int, int]:
39 g = _gcd(n, d)
40 return (n // g, d // g)
41
42
43# maximum denominator for a fraction.

Callers 3

get_quotientFunction · 0.70
get_all_eqs_and_whyMethod · 0.70
add_const_angleMethod · 0.70

Calls 1

_gcdFunction · 0.70

Tested by

no test coverage detected