Re: need a good implementation of pseudorandom generators
- From: "Jeff Miller" <milleratotago@xxxxxxxxx>
- Date: 28 Mar 2006 16:36:30 -0800
nikhilbhargav_nsit@xxxxxxxxxxxxx wrote:
I haveIn many languages, you need to call a procedure named "randomize"
to perform a large number of simulations for it and require a good
pseudorandom generator for it.
I am currently using a suimple implementation based on rand() function.
But if i run the simulation 100 times then on all 100 times it gives
the same set of random values.
at the beginning of the program to initialize the random number
generator to a new seed, and thereby get a different sequence of
random values out. Sounds like you haven't done that.
This won't necessarily give you high quality random numbers though--
that depends on the nature of the built-in rand function. If you want
to
code your own, there are several good generator algorithms around.
Mersenne Twister is one that is used a lot, and George Marsaglia has
developed a few. Alternatively, your program could read in previously
generated random numbers from a file; there are several sources
of those.
.
- Follow-Ups:
- Re: need a good implementation of pseudorandom generators
- From: nikhilbhargav_nsit
- Re: need a good implementation of pseudorandom generators
- References:
- need a good implementation of pseudorandom generators
- From: nikhilbhargav_nsit
- need a good implementation of pseudorandom generators
- Prev by Date: Re: Choosing a Sample Size Formula
- Next by Date: Re: Variance as central moment
- Previous by thread: need a good implementation of pseudorandom generators
- Next by thread: Re: need a good implementation of pseudorandom generators
- Index(es):
Relevant Pages
|