Jeroen Bollen:

Divisions for every result would be expensive, and shifting
the output wouldn't return a uniform distribution.

If the ulong is uniform, then every of its ubytes is uniform. So "& ubyte.max" could suffice. If that's not good enough for you, then you can xor together the eight ubytes of the ulong with some masking & shifts :-)

Bye,
bearophile

Reply via email to