F64.ri_up: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/src/math/f64.bend as F64 Lines 690-700 of bend-collections-laws-crypto@1.0.0.0/src/math/f64.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/f64.bend&start_line=690&end_line=700 import Base import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W import bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend as X # whether the integer part q (remainder r, half h of the unit) moves up one def ri_up(m: RMode, +s: Bool, +q: W.U64, +r: W.U64, +h: W.U64) -> Bool: match m: case Trunc{}: False{} case Floor{}: Bool.and(s, Bool.not(X.is_zero(r))) case Ceil{}: Bool.and(Bool.not(s), Bool.not(X.is_zero(r))) case Even{}: Bool.or(X.lt(h, r), Bool.and(X.eq(r, h), X.odd(q))) 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=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/f64.bend&name=RMode https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend&name=U64 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend&name=eq https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend&name=is_zero https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend&name=lt https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend&name=odd