def words

lawful-bytes@0.1.1.0 · fast.bend:39

import lawful-bytes@0.1.1.0/fast.bend as Fast
import Base

39# How many words hold bytes from .. to-1 (0 when to <= from).
40def words(+from: U32, +to: U32) -> Nat:
41  Bool.pick(Nat, U32.is_le(to, from), 0n, U32.to_nat(((((to - 1 : U32) >> 2n : U32) - (from >> 2n : U32) : U32) + 1 : U32)))

Uses (8)

Used by (8)