Fmt.Big.divsmall: def of bend-kit-fmt@0.1.0.0 Import: import bend-kit-fmt@0.1.0.0/fmt.bend as Fmt Lines 182-194 of bend-kit-fmt@0.1.0.0/fmt.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-fmt@0.1.0.0/fmt.bend&start_line=182&end_line=194 import Base # (q + t / s, t % s) for t < 10 s, by repeated subtraction. def Big.divsmall(f: Nat, ge: Bool, +q: U32, +t: List<&2, U32>, +s: List<&2, U32>) -> U32 & List<&2, U32>: match f: case 0n: (q, t) case 1n+g: match ge: case False{}: (q, t) case True{}: +t2 = {Big.sub(t, s, 0) : List<&2, U32>} Big.divsmall(g, Cmp.is_ge(Big.cmp(t2, s)), U32.add(q, 1), t2, s) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp.is_ge https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=bend-kit-fmt@0.1.0.0/fmt.bend&name=Big.cmp https://jend.leeeet.dev/definition.txt?path=bend-kit-fmt@0.1.0.0/fmt.bend&name=Big.sub