def q_clamp
import bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend as W64import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W
289# min(q, 2^32 - 1)
290def q_clamp(+q: W.U64) -> U32:
291 q_clamp_z(lo(q), U32.is_zero(hi(q)))
Uses (6)
Used by (5)
- bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/w64est:est_eq
- bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/w64est:est_eq_c
- bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/w64est:est_eq_n
- bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/w64est:est_m
- bend-collections-laws-crypto@1.0.0.0/src/math/w64:isqrt_big