def round_w

bend-collections-laws-crypto@1.0.0.0 · src/math/f64.bend:670

import bend-collections-laws-crypto@1.0.0.0/src/math/f64.bend as F64
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

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))

Uses (6)

Used by (9)