[erlang-bugs] Repeatable output from crypto:rand_uniform with negative Low value

Robert Newson robert.newson@REDACTED
Fri Aug 12 23:50:06 CEST 2011


Hi,

I've noticed that repeated calls to crypto:rand_uniform return the
same values if Low is negative and High is (approximately) equal to
-Low, and the answer is also outside of the requested range.

e.g,;

7> crypto:rand_uniform(-10000,10000).
65536
8> crypto:rand_uniform(-10000,10000).
65536
9> crypto:rand_uniform(-10000,10000).
65536

This is with R14B03.

Regards,
B.



More information about the erlang-bugs mailing list