BendtorchLoad.W64.mul_small: def of bendtorch-load@1.3.0.0 Import: import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad Lines 50-54 of bendtorch-load@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-load@1.3.0.0/main.bend&start_line=50&end_line=54 import Base # a * k for k < 2^16 (enough for bytes a number and decimal digits), wrapping at 2^64: lo = l1 2^16 + l0, so # lo * k = (l1 k) 2^16 + l0 k, where both products fit a U32 def W64.mul_small(a: W64, +k: U32) -> W64: match a: case W64{h, +l}: W64.mul_go(h, k, (U32.and(l, 65535) * k : U32), (U32.shrn(l, 16n) * k : U32)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=W64 https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=W64.mul_go