Random Number Generator (RND)

  • Thread starter Thread starter Stephen
  • Start date Start date
S

Stephen

I was looking to use a random number generator, which will
not generate the same random list of numbers in a set once
the variable is reinitialized. "Rnd" will give me the same
sequence everytime for a set of numbers n. Could someone
tell how to solve this problem, I woudl greatly appreciate
it! Thanks!
 
Stephen,
Check out Randomize in Help....
"Before calling Rnd, use the Randomize statement without an argument to
initialize the random-number generator with a seed based on the system
timer."
 
Stephen said:
I was looking to use a random number generator, which will
not generate the same random list of numbers in a set once
the variable is reinitialized. "Rnd" will give me the same
sequence everytime for a set of numbers n. Could someone
tell how to solve this problem, I woudl greatly appreciate
it! Thanks!

Most programming languages allow for changing the seed in their RNG
function. The easiest thing is to simply use a different seed with
your Rnd pseudorandom function each time you want a different
sequence.

If this is not what you want, you may need a true random number
generator (TRNG). A TRNG's use physical entropy sources to produce
non-deterministic sequences of numbers: that is, sequences that never
repeat.

You can download a free trial of the ComScire PCQNG at
http://www.ComScire.com/Downloads/

This program extracts entropy from relative jitter in clock signals in
your PC and processes it to produce a true random number sequence.
One of the free included programs (PCQNGfile) allows for immediate
production of a 32-bit integer (or binary) file of true random
numbers.
 
Back
Top