def round_w
import bend-collections-laws-math@1.0.0.0/src/math/f64.bend as F64import Base
import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as W
import bend-collections-laws-math@1.0.0.0/src/math/w64.bend as X
670# the double nearest to (-1)^s * w * 2^(x - 3000), for x >= 63: every exact
671# result below is an integer of at most 64 bits at a scale, rounded once
672def round_w(+s: Bool, +x: Nat, +w: W.U64) -> F64:
673 rw_z(s, x, w, X.is_zero(w))