def sm_eq2
import bend-collections@1.0.0.0/src/math/f64.bend as F64import 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
277def sm_eq2(+s: Bool, +e: Nat, +fa: W.U64, +fb: W.U64, c: Cmp) -> F64:
278 match c:
279 case EQ{}:
280 zero(False{})
281 case LT{}:
282 sm_exact(Bool.not(s), Nat.sub(e, 1n), X.sub(fb, fa))
283 case GT{}:
284 sm_exact(s, Nat.sub(e, 1n), X.sub(fa, fb))