|
-
April 30th, 1999, 05:04 AM
#1
The run-time library rand() function
Hi,
Anybody got any idea what algorithm is used by the random number generator ?
Thanks,
Brendan
-
April 30th, 1999, 07:30 AM
#2
Re: The run-time library rand() function
Have a look at the code. It's in the CRT\SRC subdirectory.
-
April 30th, 1999, 07:53 AM
#3
Re: The run-time library rand() function
Hi,
I don't have a CRT/SRC directory !!! What's the full path of yours ?
Brendan
-
April 30th, 1999, 02:14 PM
#4
Re: The run-time library rand() function
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
-
April 30th, 1999, 09:50 PM
#5
Re: The run-time library rand() function
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.
-
May 1st, 1999, 02:34 PM
#6
Re: The run-time library rand() function
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.
-
May 4th, 1999, 02:23 AM
#7
Re: The run-time library rand() function
-
May 4th, 1999, 02:25 AM
#8
Re: The run-time library rand() function
-
May 4th, 1999, 02:25 AM
#9
Re: The run-time library rand() function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|