From: Jason Alexander Newsgroups: comp.os.msdos.djgpp Subject: Source for random()? Date: Tue, 24 Mar 1998 11:38:41 -0800 Organization: University of California, Irvine Lines: 13 Message-ID: <35180BC1.8AD330C1@ea.oac.uci.edu> NNTP-Posting-Host: pv1821.pv.reshsg.uci.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk What are the values of m,a, and c that random() uses? (I'm assuming it's a linear congruential random number generator, if not, please let me know). I've looked up both rand() and random() using info, but they don't provide the specific formula. Also, does anyone have an (informed) opinion on which of the two generators is better? (Where "better" is understood in terms of the theoretical and empirical tests described in Knuth vol. 2. I know all linear congruential generators eventually fail the spectral test, but I was wondering which of rand() and random() perform better.) Jason