A fast 128-bit multiplicative generator for non-cryptographic random numbers.
Every procedure comes in two forms: one that takes a *Random_State of your own and one without a state
that uses context.mcg_state (the module adds that field to the context, so each thread and each context
copy has its own stream). The sequence is fully determined by the seed. A context that is never seeded
starts from the same state every run, so seed from the clock when runs should differ. Nothing here is
suitable for cryptography, and a state must not be shared between threads without a lock.
Starts the generator from new_seed. A u64 seed fully determines the stream, as does a Random_State, which is copied with its low half forced odd, or a time value (low and high are copied the same way).
A float64 in [0, 1) from all 64 random bits, rounding down to the largest value below 1 when the division would round up to 1. The values are not evenly spaced: the float64 grid is finer near 0 than near 1, so prefer random_get_zero_to_one_open_new when an even grid matters.
The generator's 128-bit state, as two halves. Seed it with random_seed before drawing: an all-zero state (a
plain state: Random_State;) is a fixed point of the generator and only ever yields zero.