News for hackers. Stuff that matters.
Re:The bell has tolled for rand() by fulafel on Thursday February 12, 2015 @05:32AM (#9038234)
The claim that the C standard suggests not using it is disingenuous: The footnote in question just says that there aren't implementation quality guarantees and specific requirements can be met with application specific RNGs. This applies to most of the standard library...

Also the anecdote about bad rand() in a 1983 BSD libc says little about current rand() implementations!

These look ok, for example:

https://github.com/lattera/glibc/blob/master/stdlib/random_r...

https://www.opensource.apple.com/source/Libc/Libc-320/stdlib...

Of course it's true that relying on libc implementation quality is always risky for maximally portable programs. Same can be said for stdio, malloc, etc etc.

Re:The bell has tolled for rand() by tedunangst on Thursday February 12, 2015 @07:46AM (#9038518)
rand() and random() are different functions.