def div_small
import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as U64import Base
85# Unsigned a / d, for 0 < d <= 2^20.
86def div_small(a: U64, +d: U32) -> U64:
87 U64{+lo, +hi} = a
88 div_t2(lo, hi, d, U32.add(U32.mul(U32.mod(hi, d), 4096), U32.div(lo, 1048576)))
Uses (7)
Used by (6)
- bend-collections-laws-math@1.0.0.0/proofs/math/u64/u64div:div_bits
- bend-collections-laws-math@1.0.0.0/src/math/u64:div_sign
- bend-collections-laws-math@1.0.0.0/proofs/math/u64/u64div:div_value
- bend-collections-laws-math@1.0.0.0/proofs/math/u64/u64div:signed_g
- bend-collections-laws-math@1.0.0.0/spec/math/u64:DivSmall.quotient
- …