def jam
import bend-collections-laws-math@1.0.0.0/spec/math/w64.bend as W64import Base
112# shifted right, with the shifted-out bits OR-ed into bit 0 (SoftFloat's
113# softfloat_shiftRightJam64); jam(q, r) sets q's bit 0 when r is nonzero
114def jam(+q: Nat, +r: Nat) -> Nat:
115 Nat.add(Nat.mul(2n, Nat.div(q, 2n)), Nat.max(Nat.mod(q, 2n), Nat.min(r, 1n)))
Uses (7)
Used by (58)
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64round:jam_form
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64rtools:jam_fits
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64rtools:round_jam
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64sqr:fin_v
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64sh:jam0_m
- …