On Wed, 15 May 2002, Peter Jay Salzman wrote:

> thanks jeff!
> 
> begin Jeff Newmiller <[EMAIL PROTECTED]> 
> > On Wed, 15 May 2002, Peter Jay Salzman wrote:
> > 
> > > using the same seed will produce the same set of random numbers.
> > 
> > srand->rand and srandom->random behave this way.
>  
> i forgot about srandom/random.  the man pages say that rand/srand are
> ISO C'isms and random/srandom are BSD'isms.
> 
> have you read anything that claims one set is better than the other?

That would be an implementation-dependent comparison.  In this case, the
man page for rand indicates that GNU implements rand using random.

As for trusting any library, anyone serious about publishing monte-carlo
simulation code implements their own random number generators, because
implementation quality does vary a lot.  Numerical Recipes contains some
useful cookbook code.  I have a copy if you want to look at
it.

Note that the issues Mike raises with regard to "randomness" vs.
"pseudo-randomness" are important, but not in this context.
Cryptographically, randomness is most important, but in simulation,
psuedo-randomness (so that you can repeat a simulation if desired) is
almost universally preferred.

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[EMAIL PROTECTED]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------

_______________________________________________
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to