The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 06-29-2009
pludi's Avatar
pludi pludi is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2008
Location: .at
Posts: 1,846
Depending on what you need, the srand()/rand() PRNG combination works well. But for a larger number of samples, it starts being predictable and clusters. More advanced generators are the Blum-Blum-Shub generator or Fortuna. If you need real random numbers, you might try a service like random.org or build your own true random number generator.