Mail Archives: djgpp/2000/03/09/10:23:57
On Wed, 8 Mar 2000, Ben Davis wrote:
> I know what random() and srandom() are. But what are initstate() and
> setstate()? The help files are very unspecific.
There's nothing to say about `setstate' except what the docs says.
Its argument is typically a value returned by a previous call to
`initstate'.
As for `initstate', it is impossible to explain it without describing
the theory behind the random number generator used by `random' and its
specific implementation. (If somebody has enough time and motivation
to write that up, please send it for inclusion in a future release of
DJGPP.)
If you already know how `random's innards work, and you have specific
questions about `initstate', please ask those specific questions.
Otherwise, I suggest to take a good look at the sources of `random' in
the djlsr203.zip archive.
- Raw text -