Re: 32-bit random numbers

new topic     » goto parent     » topic index » view thread      » older message » newer message

Juergen Luethje wrote:
 [snip]
 
> Derek, do you think using set_rand() is essential here?

If you are after a pseudo-random generator then it would not be required,
but if you want truer randomness, then it would be helpful.
 
Each value returned by rand() is dependent on the previous value,
the initial seed and how many previous values you have gotten so far.

By inserting set_rand() with values not based on anything that rand()
returns, you will get more unpredictablity about which value will
be the next returned by rand(). Without this, you can 100% 'predict'
the value because it is calulated.

In general use, this is not a big issue, but in areas of gaming, encryption,
and other high-volume random numbers, it is important.

-- 
Derek Parnell
Melbourne, Australia

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu