Rand.to_float: def of bend-collections@1.0.0.0 Import: import bend-collections@1.0.0.0/src/math/random/rand.bend as Rand Lines 239-241 of bend-collections@1.0.0.0/src/math/random/rand.bend: https://jend.leeeet.dev/read.txt?path=bend-collections@1.0.0.0/src/math/random/rand.bend&start_line=239&end_line=241 import Base import bend-collections@1.0.0.0/src/math/u64.bend as W import bend-collections@1.0.0.0/src/math/w64.bend as X import bend-collections@1.0.0.0/src/math/f64.bend as F # Go's Float64: float64(x << 11 >> 11) / (1 << 53), the low 53 bits def to_float(+x: W.U64) -> F.F64: f53_z(W.U64{X.lo(x), U32.and(X.hi(x), 2097151)}, X.is_zero(W.U64{X.lo(x), U32.and(X.hi(x), 2097151)})) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/f64.bend&name=F64 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/random/rand.bend&name=f53_z https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/u64.bend&name=U64 https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/w64.bend&name=hi https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/w64.bend&name=is_zero https://jend.leeeet.dev/definition.txt?path=bend-collections@1.0.0.0/src/math/w64.bend&name=lo