Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

what's with the random number generation at the start? how does rand() + 3*rand() improve on just rand()?


There's a great series of answers to this on StackOverflow:

http://stackoverflow.com/questions/3956478/understanding-ran...

In short: doing things like this actually reduces the randomness of the end result.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: