X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <46DF58E2.9CEC1948@yahoo.com> Date: Wed, 05 Sep 2007 21:33:22 -0400 From: CBFalconer Organization: Ched Research http://cbfalconer.home.att.net X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: random() : What am I doing wrong? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 23 NNTP-Posting-Date: 06 Sep 2007 01:00:04 GMT X-Complaints-To: abuse AT teranews DOT com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Gordon DOT Schumacher AT seagate DOT com wrote: > DJ Delorie wrote on 09/05/2007 09:11:13 AM: > >>> That depends if you care about equidistribution; if you do, >>> you'd be better off >> >> ... not using random() in the first place. > > Fair enough :) I can recommend the Mersenne Twister for this, > if anyone cares... And a suitable module for the Mersenne is included in the hashlib package to ensure testing always uses the same sequence of 'random' values. See: -- Chuck F (cbfalconer at maineline dot net) Available for consulting/temporary embedded and systems. -- Posted via a free Usenet account from http://www.teranews.com