def of_nat

bend-collections-laws-crypto@1.0.0.0 · spec/math/w64.bend:40

import bend-collections-laws-crypto@1.0.0.0/spec/math/w64.bend as W64
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as C
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W

40# the U64 of a value below 2^64
41def of_nat(+n: Nat) -> W.U64:
42  W.U64{U32.from_nat(C.low(32n, n)), U32.from_nat(C.high(32n, n))}

Uses (5)

Used by (5)