repeating random number sequences.
Jason den Dulk
public2 at jasondendulk.com
Tue Aug 27 05:59:17 PDT 2013
Hi
This code
foreach (j; 0..5)
writeln(rndGen().take(5));
writeln(uniform(0, 1024));
foreach (j; 0..5)
writeln(rndGen().take(5));
produces this output
[3410716173, 2484862302, 280352965, 1820347603, 850366086]
[3410716173, 2484862302, 280352965, 1820347603, 850366086]
[3410716173, 2484862302, 280352965, 1820347603, 850366086]
[3410716173, 2484862302, 280352965, 1820347603, 850366086]
[3410716173, 2484862302, 280352965, 1820347603, 850366086]
813
[2484862302, 280352965, 1820347603, 850366086, 604192828]
[2484862302, 280352965, 1820347603, 850366086, 604192828]
[2484862302, 280352965, 1820347603, 850366086, 604192828]
[2484862302, 280352965, 1820347603, 850366086, 604192828]
[2484862302, 280352965, 1820347603, 850366086, 604192828]
Is this correct behaviour? It appears a little inconsistant to me.
Regards
Jason
More information about the Digitalmars-d-learn
mailing list