Click here to Skip to main content
15,938,446 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more: (untagged)
I would like to understand how random number generators used in various compilers/websites vary. I would like to do some random number tests on my home PC using Visual C++ 6.0 to simulate results that other web based random number generators might produce or that other compilers might produce. For example, suppose I go to a poker website which generates "random" card sequences. I would like to use that same random number generator scheme to run simulations on my PC - how would I go about matching random number generators to do this. I'm guessing there can't be that many different random number generators in use
Thanks!
Posted

Some bedtime reading NIST 800-90[^]

 
Share this answer
 
Most use time and try to obfuscate it beyond recognition with formulas...no idea if there's a "standard" formula for it though. Use "include ctime" and use srand(time()) . (Just search for random number generator in google and you can probably find source code for one...)
If you're trying to figure out how to cheat at poker games you'll have to figure out what formula they're using [laugh] .

modified on Thursday, July 10, 2008 4:11 PM
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900