def norm_f

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

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

201def norm_f(+e: Nat, +f: W.U64) -> W.U64:
202  match e:
203    case 0n:
204      X.shl(f, Nat.sub(X.clz(f), 11n))
205    case _:
206      X.add(f, W.U64{0, 1048576})

Uses (6)

Used by (3)