Fixed.u64_wsub: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/src/math/fixed.bend as Fixed Lines 301-303 of bend-collections-laws-math@1.0.0.0/src/math/fixed.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/src/math/fixed.bend&start_line=301&end_line=303 import Base import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as W import bend-collections-laws-math@1.0.0.0/src/math/w64.bend as X # a - b modulo 2^64 for any a, b: a + (2^64 - 1 - b) + 1 def u64_wsub(+a: W.U64, +b: W.U64) -> W.U64: X.add(X.add(a, X.sub(u64_max(), b)), W.U64{1, 0}) Uses (4): https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/fixed.bend&name=u64_max https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/u64.bend&name=U64 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=add https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=sub