def low

lawful-bytes@0.1.1.0 · fast.bend:31

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

31# The bytes of a word at or above byte i's place. The first word of a search
32# sets the bytes below the start to 0xFF before the zero-byte test (not the
33# flags after it): zb is exact only at its lowest zero byte, and a match below
34# the start would otherwise borrow and flag the byte at the start (found by the
35# proof agent: "A@BC" searched for 'A' from 1).
36def low(+i: U32) -> U32:
37  U32.shln(4294967295, U32.to_nat(((i .&. 3 : U32) << 3n : U32)))

Uses (4)

Used by (8)