def tu_big

bend-collections@1.0.0.0 · src/math/f64.bend:755

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

755# |x| >= 2^52: w << k with k + bit_length(w) <= 64
756def tu_big(+s: Bool, +w: W.U64, +k: Nat, fits: Bool) -> Result<&2, &2, N.NumError, W.U64>:
757  match fits:
758    case True{}:
759      tu_int(s, X.shl(w, k))
760    case False{}:
761      Fail{N.Overflow{}}

Uses (7)

Used by (1)