Hi,
Anybody got any idea what algorithm is used by the random number generator ?
Thanks,
Brendan
Printable View
Hi,
Anybody got any idea what algorithm is used by the random number generator ?
Thanks,
Brendan
Have a look at the code. It's in the CRT\SRC subdirectory.
Hi,
I don't have a CRT/SRC directory !!! What's the full path of yours ?
Brendan
When you installed VC did you include all of the MFC source, the debug code, etc?? If not, you may want to go add those, then you will have the directory! :)
- Troy
Glancing at the source code, it's a 32-bit linear-congruential generator with a multiplier of 214013 and an addend of 2531011. It returns only the top 16 bits generated.
The universe is a figment of its own imagination.
There is a book that talks about random number generators that you might find interesting called Advanced C (Second Edition) from Osborne McGraw-Hill. ISBN 0-07-881348-4.
Thanks Orion,
Brendan
Thanks Jerry,
Brendan
Thanks Troy,
Brendan