[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] random number sequence

From: Jonny Taylor
Subject: Re: [Help-gsl] random number sequence
Date: Tue, 20 May 2008 16:30:23 +0100

It works perfectly, but the problem is, that if I ran the program very
quickly one after another(or if two separate instances start at the
same time) it gives me the same sequence of random numbers, but if I
delay running the same thing for very little it gives different

In addition to the suggestions up to now, you could think about gathering randomness from various different sources - for example using a seed which is a hash of the time, the process ID, machine name, /dev/random etc.

To address your problem of reproducibility, have the code print out (or otherwise report/save) the random seed that it is actually using, so you can re-run with that same seed if you wish.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]