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

f() = (rand() + 1.0) - 1.0

and pray that your compiler isn't clever! Or you can actually randomize the fraction bits.



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

Search: