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

I remember very old versions of man random [1] warning against that sort of thing and recommending to pick the high (or low) bits of the random value. Probably the piece of advice was not correct.


Picking different bits doesn't solve modulo bias.

This is more likely a memory of the warning concerning the low quality of the randomness in the low bits (e.g. in LCGs where it always alternates in the lowest bit), or the fact the high bits of rand(3) were often zero due to a small RAND_MAX.




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

Search: