F64.rm_fix: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/math/f64.bend as F64 Lines 1115-1118 of bend-collections@1.0.0.0/src/math/f64.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/math/f64.bend&start_line=1115&end_line=1118 import Base import bend-collections@1.0.0.0/src/math/u64.bend as W import bend-collections@1.0.0.0/src/math/w64.bend as X # remainder r of divisor b at scale u, last quotient digit q: round the # quotient to nearest (ties to even) by flipping to r - b def rm_fix(+s: Bool, +u: Nat, +b: W.U64, +r: W.U64, +q: W.U64) -> F64: rm_pick(s, u, b, r, Bool.or(X.lt(b, X.add(r, r)), Bool.and(X.eq(X.add(r, r), b), X.odd(q)))) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/f64.bend&name=F64 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/f64.bend&name=rm_pick https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/u64.bend&name=U64 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/w64.bend&name=add https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/w64.bend&name=eq https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/w64.bend&name=lt https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/w64.bend&name=odd