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

From: Damian Yerrick <MYNAMEISd_yerrick AT hotmail DOT comNO2CANNEDHAM>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Uptime and entropy in DOS
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <v15jasscglg4fhjib6rg36eosscpu7n0do@4ax.com>
References: <38A82321 DOT 952B55DA AT americasm01 DOT nt DOT com> <Pine DOT SUN DOT 3 DOT 91 DOT 1000215095332 DOT 23996N-100000 AT is> <b2miasojmafqqmurpcb90b3pmf8fv0bs6v AT 4ax DOT com> <88btpi$128uk$2 AT fu-berlin DOT de>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 35
X-Trace: /bNDCy2ZYyKJww1Kj+M5HGaliNV4UanmEl1oYCqCdeHjpnFPUXeKnnPjszUrQHKp1IN5KwMwdV6y!DSgITUDh71VohDQUwkkhO0oXb8TYlbhgtQtuJi/TkImXgBPoAb5zYRiXeWNhTGecq6tzkpsudizg!o7EL2C4=
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Tue, 15 Feb 2000 18:05:22 GMT
Distribution: world
Date: Tue, 15 Feb 2000 18:05:22 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On 15 Feb 2000 16:10:29 GMT, buers AT gmx DOT de (Dieter Buerssner) wrote:

>REPLYTOd_yerrick AT hotmail DOT comNO2CANNEDHAM (Damian Yerrick) wrote in 
><b2miasojmafqqmurpcb90b3pmf8fv0bs6v AT 4ax DOT com>:
>
>>On Tue, 15 Feb 2000 09:53:49 +0200 (IST), Eli Zaretskii
>><eliz AT is DOT elta DOT co DOT il> wrote:
>>>But I don't see the above calculation anywhere in the sources of
>>>`random.c', at least as it appears in DJGPP v2.03.
>>
>>I saw it in the FreeBSD sources.  It replaces
>>  x = (x * 1103515245) + 12345;
>>in the seed generator.
>
>[I am not sure, what you mean by seed generator]

initstate()/srandom() to initialize the PRNG

>There may be a misunderstanding here. If I am not mistaken,
>your code is the classic (bad) implementation of rand()
>in BSD unices, while Eli is referring to BSD random().

Old versions of BSD random() (including the DJGPP version) use classic
rand() to initialize random()'s state.  Recent FreeBSD random() uses a
different generator to do this; I might get to work on porting the new
random() to DJGPP.

-- 
Damian Yerrick  http://yerricde.tripod.com/
Comment on story ideas: http://home1.gte.net/frodo/quickjot.html
AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/
View full sig: http://www.rose-hulman.edu/~yerricde/sig.html

This is McAfee VirusScan. Add these two lines to your .sig to
prevent the spread of .sig viruses.  http://www.mcafee.com/

- Raw text -


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