def Decimal.divk.m

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

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

68# (remainder is zero, quotient) of u / k, for a nonzero k.
69def Decimal.divk.m(m: Maybe<&1, Big.BigInt & Big.BigInt>) -> Bool & Big.BigInt:
70  match m:
71    case Some{(q, r)}:
72      (Big.BigInt.is_zero(r), q)
73    case None{}:
74      (False{}, Big.BigInt.zero())

Uses (7)

Used by (1)