Re: [algogeeks] Re: Generate random number from 1 to 10.

2014-02-10 Thread Don
https://groups.google.com/forum/#!original/comp.lang.java.programmer/Z8lfFIDhS7k/wbPLDldPSSgJ The Multiply With Carry generator is ok for some purposes. There are generators with longer periods and better statistical properties, but they are more complicated. The link I provided has code for a

[algogeeks] Re: Generate random number from 1 to 10.

2014-02-10 Thread SVIX
:) true... that was silly of me.. I was too quick to post... anyway, the point I was trying to understand was why this specific combination of operations would produce good randomness... Running the original solution you posted a million times (with the max limit set to 1000), below is the