def to_float
import bend-collections@1.0.0.0/src/math/random/rand.bend as Randimport 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
239# Go's Float64: float64(x << 11 >> 11) / (1 << 53), the low 53 bits
240def to_float(+x: W.U64) -> F.F64:
241 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)}))