delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/09/05/22:01:39

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 <cbfalconer AT yahoo DOT com>
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: <OF8023CA5C DOT B777E9E3-ON8725734D DOT 00541573-8725734D DOT 00544D8B AT seagate DOT com>
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 <dj AT delorie DOT com> 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:

  <http://cbfalconer.home.att.net/download/>

-- 
 Chuck F (cbfalconer at maineline dot net)
   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>



-- 
Posted via a free Usenet account from http://www.teranews.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019