def wordix

bend-collections@1.0.0.0 · src/containers/bitset.bend:127

import bend-collections@1.0.0.0/src/containers/bitset.bend as Bitset
import Base

127# The word index of bit i and the bit position inside that word. Base's
128# Nat.div / Nat.mod are structural definitions the proofs can peel 32 steps
129# at a time (proofs/bitset/index.bend) and the native backend evaluates in
130# constant time.
131def wordix(i: Nat) -> Nat:
132  Nat.div(i, 32n)

Uses (2)

Used by (8)