www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/15/04:51:39

Date: Tue, 15 Feb 2000 09:53:49 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Campbell, Rolf [SKY:1U32:EXCH]" <moscoop AT americasm01 DOT nt DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Uptime and entropy in DOS
In-Reply-To: <38A82321.952B55DA@americasm01.nt.com>
Message-ID: <Pine.SUN.3.91.1000215095332.23996N-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 14 Feb 2000, Campbell, Rolf [SKY:1U32:EXCH] wrote:

> > BSD random() seems to use the Apple RNG
> >   x = (x * 16807) % ((2 << 31) - 1);
> > to play with the seed.
> 
>     I believe that algorithm is not very good at making random
>     numbers.

If this is used only to randomize the seed, then it is okay.

But I don't see the above calculation anywhere in the sources of
`random.c', at least as it appears in DJGPP v2.03.

- Raw text -


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