Xref: news2.mv.net comp.os.msdos.djgpp:7226 From: stwand07 AT uctvms DOT uct DOT ac DOT za Newsgroups: comp.os.msdos.djgpp Subject: rand(), random() or libg++ Random ? Date: 13 Aug 96 14:09:21 +0200 Organization: University of Cape Town Lines: 15 Message-ID: <1996Aug13.140921@uctvms.uct.ac.za> NNTP-Posting-Host: uctvms.uct.ac.za To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hi I am busy working on an optimisation program that makes extensive use of random number (stochastic search). I have been using srand(time(NULL)) and rand() to give random numbers in the range 0..1, which I then scale as required. I have heard that rand() is not very good, so my questions are : 1. Is random() any better? 2. Are the libg++ Random classes better? I need a normal distribution with zero mean, so 'better' refers to these criteria. Adios Mark Wodrich. UCT, Cape Town, South Africa.