def rng_uniform
import bend-ml-tensor-gpu@0.1.5.1/main.bend as BendMlTensorGpuimport Base
616# the uniform of index i of counter s, in (0, 1]: the hash's low 24 bits plus one, over 2^24 (exact)
617def rng_uniform(+s: U32, +i: U32) -> F32:
618 (U32.to_f32((U32.and(rng_hash(s, i), 16777215) + 1 : U32)) / 16777216.0 : F32)