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

Function simplify

pretty.py:57–59  ·  view source on GitHub ↗
(n: int, d: int)

Source from the content-addressed store, hash-verified

55
56
57def simplify(n: int, d: int) -> tuple[int, int]:
58 g = _gcd(n, d)
59 return (n // g, d // g)
60
61
62def pretty2r(a: str, b: str, c: str, d: str) -> str:

Callers

nothing calls this directly

Calls 1

_gcdFunction · 0.70

Tested by

no test coverage detected