Decimal.Decimal.div_exact: def of bend-kit-bignum@0.1.0.0 Import: import bend-kit-bignum@0.1.0.0/decimal.bend as Decimal Lines 152-158 of bend-kit-bignum@0.1.0.0/decimal.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&start_line=152&end_line=158 import Base import bend-kit-bignum@0.1.0.0/bigint.bend as Big # a / b exactly, at the smallest scale that holds it; None for a zero # divisor or a repeating quotient (use Rational for those). def Decimal.div_exact(a: Decimal, b: Decimal) -> Maybe<&2, Decimal>: match a b: case Decimal{ua, sa} Decimal{ub, sb}: Decimal.from_fraction(Big.BigInt.mul(ua, Decimal.pow10(sb)), Big.BigInt.mul(ub, Decimal.pow10(sa))) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/bigint.bend&name=BigInt.mul https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&name=Decimal https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&name=Decimal.from_fraction https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&name=Decimal.pow10