Xref: news2.mv.net comp.os.msdos.djgpp:7214 From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: rand(), random() or libg++ Random ? Date: Tue, 13 Aug 1996 19:16:14 -0700 Organization: Three pounds of chaos and a pinch of salt Lines: 33 Message-ID: <321136EE.67D@cs.com> References: <1996Aug13 DOT 140921 AT uctvms DOT uct DOT ac DOT za> <4uq9mk$6g7 AT synge DOT maths DOT tcd DOT ie> NNTP-Posting-Host: ppp220.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: steve AT maths DOT tcd DOT ie CC: stwand07 AT uctvms DOT uct DOT ac DOT za DJ-Gateway: from newsgroup comp.os.msdos.djgpp Sumo Steve wrote: > > stwand07 AT uctvms DOT uct DOT ac DOT za writes: > > >Hi > > >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. > > 1. nope AFAIK random is a macro which calls rand Wrong - random() is supposedly a much better random number generator than rand(). You seed it with srandom() instead of srand(). > 2. libg++ does contain a random normal class, and I'd imagine > the quality is far superior than rand Well, if it calls the random() algorithm to do its work, then probably yes. :) However, if he's not using C++, it seems silly to start just to get this trivial piece of functionality... -- John M. Aldrich, aka Fighteer I -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>+ W+>++ N++ o+ K? w(---) O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+ tv+() b+++ DI++ D++ G e(*)>++++ h!() !r !y+() ------END GEEK CODE BLOCK------