delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/04/27/07:13:18

From: Martin Stromberg <Martin DOT Stromberg AT lu DOT erisoft DOT se>
Message-Id: <200004271205.OAA00093@lws256.lu.erisoft.se>
Subject: Re: rand() in libc
To: buers AT gmx DOT de
Date: Thu, 27 Apr 2000 14:05:34 +0200 (MET DST)
Cc: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
In-Reply-To: <200004270947.FAA27604@delorie.com> from "Dieter Buerssner" at Apr 27, 2000 12:52:02 PM
X-Mailer: ELM [version 2.5 PL3]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Dieter said:
> I think, the only PRNG in libc, that may be changed, is rand(). The 
> rand48 family seems to be what I know from Cray and/or some Unix 
> variants. The random() seems to be BSD random. So changing (even 
> advancing) these may break some code. (To test a port to djgpp, you 
> may run a simulation and compare with the expected results.)

I'm interested in whether the rand48() functions behave approximately
as well as on other architectures/implementations, because I wrote
them from scratch and I didn't do any extensive testing (of lack of
knowledge how). In particular I wonder how the ones generating doubles
(drand48(), erand48()) behave, as I improvised most on them.


Right,

							MartinS

- Raw text -


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