New random_unit_interval implementation
Re-wrote the random_unit_interval
function to generate doubles with 48 bits of random mantissa (3.5e-15), as opposed to the current 32-bit version (2.3e-10).
This implementation uses rand_r
(to blend the initial state bytes), and erand48
to generate the result over the initial state bytes. The implementation of both functions is inlined to avoid relatively expensive function calls.
This change passes both the testRandom
and testRandomSpacing
tests.