www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/14/17:02:26

From: "Campbell, Rolf [SKY:1U32:EXCH]" <moscoop AT americasm01 DOT nt DOT com>
Newsgroups: comp.os.msdos.programmer,comp.os.msdos.djgpp
Subject: Re: Uptime and entropy in DOS
Date: Mon, 14 Feb 2000 10:45:37 -0500
Organization: Nortel Networks
Lines: 15
Message-ID: <38A82321.952B55DA@americasm01.nt.com>
References: <lra6ascbh1fu2d4738d44h09kpooc8ecta AT 4ax DOT com> <38A5583C DOT EDF375B4 AT is DOT elta DOT co DOT il> <591baskf2ns6u0n0l6kp8rgml7aa2q80la AT 4ax DOT com> <38a5a2da_1 AT news DOT uni-bielefeld DOT de> <nnqbascljg3asdbuafbin6mf51ka985hq5 AT 4ax DOT com>
NNTP-Posting-Host: wmerh0tk.ca.nortel.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.71 [en] (X11; I; HP-UX B.10.20 9000/785)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick 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
you use it to generate (x,y,z) triples and plot them, every point will lie on
one of 11 planes.  There are better algorithms out there.

--
(\/) Rolf Campbell (\/)



- Raw text -


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