+ 6
Random number with uniform distribution
I'm trying to generate random numbers between zero and one with uniform distribution, is there any way?
3 Réponses
+ 6
Thanks for your reply Dennis, and Do you know what method is used to generate pseudo-random numbers in c++11?? Is it based on cpu clock?
+ 4
That depends on the engine that you use that is listed on the same page.
std::mt19937 is the one I usually use which uses the Mersenne Twister algorithm.
https://en.wikipedia.org/wiki/Mersenne_Twister