So I know I can call random(long val) in Java to generate a random number with a seed of 2^63. How would one do better (larger seed value)? I’m assuming this would have to be a manual class to perform such an accomplishment, but I’m a little lost as how to begin.
So I know I can call random(long val) in Java to generate a random
Share
Two ways to increase the amount of seed material are:
For the first, look at some of George Marsaglia’s methods, which use arrays to hold their state. There is an example at http://programmingpraxis.com/2010/10/05/george-marsaglias-random-number-generators/ (be careful to note the correction in the comments:
The array t[256] is where most of the seed is held.
For the second, look at Pierre L’Ecuyer’s work, for example, Efficient and Portable Combined Random Number Generators