def W64.div.bits

bend-osdev-word64@0.1.1.0 · word64.bend:262

import bend-osdev-word64@0.1.1.0/word64.bend as Word64
import Base

262# the m bits of w (least significant first) read onto qr, most significant
263# first
264def W64.div.bits(m: Nat, w: Word(m), +b: W64, qr: W64 & W64) -> W64 & W64:
265  match m w:
266    case 0n WNil{}:
267      qr
268    case 1n+p WCon{x, hi}:
269      W64.div.step(x, b, W64.div.bits(p, hi, b, qr))

Uses (7)

Used by (4)