MlbendGenerative.mix32_inv: def of mlbend-generative@0.1.1.0 Import: import mlbend-generative@0.1.1.0/main.bend as MlbendGenerative Lines 48-56 of mlbend-generative@0.1.1.0/main.bend: https://jend.leeeet.dev/read.txt?path=mlbend-generative@0.1.1.0/main.bend&start_line=48&end_line=56 import Base # the inverse of mix32, in closed form: the 16-shift is an involution on # 32 bits; the 13-shift inverts by the triple xor; the multiplies invert # by their modular inverses mod 2^32 def mix32_inv(+z: U32) -> U32: +d = U32.xor(z, U32.shrn(z, 16n)) +c = (d * 2828982549 : U32) +b = unxor13(c) +a = (b * 3066638151 : U32) U32.xor(a, U32.shrn(a, 16n)) 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.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.xor https://jend.leeeet.dev/definition.txt?path=mlbend-generative@0.1.1.0/main.bend&name=unxor13