Mail Archives: djgpp/1998/03/23/08:38:01
>If anyone could tell me how to get REAL random generated numbers under
>djgpp ... and/or explain me how it works ! I wonder for a long time how
>a computer can generate random numbers
I would like to know it too! ;-)
Computers cannot generate real random numbers, what they can do is run some
program in a deterministic way. (at least PCs do :-)
Random numbers on PCs are actually pseudo-random numbers. They are
generated
using some functions with particular mathematical properties:
they return numbers very well distributed on a particular set of values and
IIRC they return the original sequence of values only after a number of
calls
greater then the cardinality of the given set of values.
This makes the functions look like if they generate random numbers, but
they
actually don't!
ciao
Giacomo
- Raw text -