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

Re: Random numbers generation

On 12/7/05, Aaron M. Ucko <ucko@debian.org> wrote:
> Lisandro Damian Nicanor Perez Meyer <perezmeyer@gmail.com> writes:
> > ¿Is there any way of making differents results without having to change the
> > seed from "the outside"?
> It looks like you can also call gsl_rng_set(r, some_seed); or assign
> directly to gsl_rng_default_seed, at least with the version of gsl
> available in sid (unstable).

I have found the best approach is to have a default seed (probably the
default that GSL uses) and allow the setting of an alternative seed
via a command-line option or input file (using one of the above
methods).  You do not want the seed to be ``random'', as that makes
bugs difficult to find.  You want your output to be deterministic,
even when using random numbers.

David Dooling

Reply to: