def Decimal.lowest

bend-kit-bignum@0.1.0.0 · decimal.bend:98

import bend-kit-bignum@0.1.0.0/decimal.bend as Decimal
import 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))

Uses (4)

Used by (2)