Could somebody please explain how to generate two independent streams of random numbers using erand48()?
My original theory was to just use 2 different shorts as inputs, ie
double rand1, rand2;
unsigned short s1, s2;
rand1 = erand48(s1);
rand2 = erand48(s2);
However this just prduced 2 *identical* streams.
One solution that was presented to me was use erand48 as above for the first stream. Then for the second, use numbers far enough down the stream so that the random value has no dependance on the initial seed, by running the erand48 something like 1,000,000 times. However, when trying to save these variables I get error messages that say that an array cannot be that large (1,000,000).
Is there another way to store these variables? Am I even on the right track?
Any help is appreciated.