def Mag.long

bend-kit-bignum@0.1.0.0 · bigint.bend:227

import bend-kit-bignum@0.1.0.0/bigint.bend as Bigint
import Base

227# Long division over the dividend's limbs, most significant first. Quotient
228# digits are consed, so the quotient comes out little-endian.
229def Mag.long(xs: List<&2, U32>, +bn: List<&2, U32>, +n: Nat, +n1: Nat,
230  +vt: U32, qr: List<&2, U32> & List<&2, U32>) ->
231  List<&2, U32> & List<&2, U32>:
232  match xs:
233    case Nil{}:
234      qr
235    case Con{x, t}:
236      Mag.long(t, bn, n, n1, vt, Mag.step(x, bn, n, n1, vt, qr))

Uses (5)

Used by (1)