Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Can I seed srand() with results from rand()?

by BrowserUk (Patriarch)
on Jul 10, 2003 at 02:03 UTC ( [id://272874]=note: print w/replies, xml ) Need Help??


in reply to Can I seed srand() with results from rand()?

My take on the "don't call srand multiple times" stuff is that doing so is likely to compromise the randomness of the sequences returned by rand rather than improve them as might be naively assumed.

In this case, you specifically want to reproduce the same sequences, and you only intend to call srand once for each sequence, so I would say that you do know what you are doing.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://272874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-03-28 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found