Fixed.u32_wrapping_shl: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/src/math/fixed.bend as Fixed Lines 146-149 of bend-collections-laws-math@1.0.0.0/src/math/fixed.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/src/math/fixed.bend&start_line=146&end_line=149 import Base import bend-collections-laws-math@1.0.0.0/src/math/w64.bend as X # shifts by s mod 32 (Rust masks the amount the same way); a left shift is # the product with 2^k modulo 2^32 def u32_wrapping_shl(+a: U32, +s: U32) -> U32: U32.mul(a, X.pow2(U32.to_nat(U32.and(s, 31)))) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=pow2