def round.go
import bend-lawful-stdlib@0.1.0.0/src/float/format.bend as Formatimport Base
import bend-lawful-stdlib@0.1.0.0/src/float/bin.bend as Bin
83def round.go(+top: Nat, neg: Bool, m: Bin.Bin, +e: Nat, +t: Nat, exact: Bool) -> Val:
84 match exact:
85 case True{}:
86 over(top, neg, m, e)
87 case False{}:
88 round.fin(top, neg, t, Bin.shr(Nat.sub(t, e), m, False{}, False{}))