IMHO: > 2. A different sequence
The word "different" in this context is ambiguous: is it "unrelated" as a generator, or is it "not the same" sequence of the actual numbers? > I read this as the newlib technique being one way of correctly implementing > rand/srand, no? If the first, then yes; but if the second, then no. The problem with the first approach is, however, is the inability to adequately randomize your code (e.g. for testing). You call srand() in the main() thread, and then spawn threads thinking they will inherit the randomization; but in fact, they all start off the same number sequence, regardless. Anton Lavrentiev Contractor NIH/NLM/NCBI -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple