Hacker News new | past | comments | ask | show | jobs | submit login

No, C's rand is unsuited for most randomized algorithms. MCMC algorithms won't work with rand unless you're lucky, it's even unsuited for choosing pivots for quicksort. The only application where it might be ok is games.



> The only application where it might be ok is games.

Not even that. Different types of games require different types of RNGs (e.g. in an RPG or strategy game you probably want a stable seeded RNG to preclude RNG save-scumming), the C standard requires almost no guarantee of rand().


> The only application where it might be ok is games.

This is silly, there are plenty of ways randomness is used to communicate randomness to the user (think games, song shuffling, visualizations, art, etc. Algorithms using randomness ≠ randomized algorithms.




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

Search: