def nonzero

stelliferous@0.0.2.0 · math_compare.bend:5

import stelliferous@0.0.2.0/math_compare.bend as MathCompare
import Base

5# One for a nonzero word, zero otherwise, without a Bool match.
6def nonzero(+word: U32) -> U32:
7  U32.shrn(U32.or(word,(0 - word : U32)),31n)

Uses (4)

Used by (2)