def Decimal.lowest
import bend-kit-bignum@0.1.0.0/decimal.bend as Decimalimport Base
import bend-kit-bignum@0.1.0.0/bigint.bend as Big
98# n / d in lowest terms with a positive denominator; d must be nonzero.
99def Decimal.lowest(+n: Big.BigInt, +d: Big.BigInt) -> Big.BigInt & Big.BigInt:
100 Decimal.lowest.by(n, d, Big.BigInt.gcd(n, d))