The function into_float_with_exponent implements the standard bit-pattern hack to grab the 53 significant bits and subtract 1. However, according to http://xoshiro.di.unimi.it/ (see section "Generating uniform doubles in the unit interval") this halves the range of possible values by always resulting a least significant bit of zero. It is proposed to just use the more straight-forward (myint>>11) as f64 / (1u64 << 53) as f64 instead.
The function
into_float_with_exponentimplements the standard bit-pattern hack to grab the 53 significant bits and subtract 1. However, according to http://xoshiro.di.unimi.it/ (see section "Generating uniform doubles in the unit interval") this halves the range of possible values by always resulting a least significant bit of zero. It is proposed to just use the more straight-forward(myint>>11) as f64 / (1u64 << 53) as f64instead.