delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/11/22/12:17:31

Date: Sun, 22 Nov 1998 19:16:04 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Kbwms AT aol DOT com
cc: ams AT ludd DOT luth DOT se, djgpp-workers AT delorie DOT com
Subject: Re: More rand()
In-Reply-To: <64f4d6d8.36583cbe@aol.com>
Message-ID: <Pine.SUN.3.91.981122190753.19060A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

On Sun, 22 Nov 1998 Kbwms AT aol DOT com wrote:

> Who generates this interest?

We do ;-).

Seriously, though: one of DJGPP's main goals is portability, mainly to 
Unix systems.  Every Unix box I have seen has [delmnjs]rand48 family of 
functions in its C library.  Which I believe explains why there is 
interest in having them, and why people ask about them from time to
time.

> How does one verify that the *rand48() functions work correctly?

This depends on where will the code come from.  If the sources are in 
public domain, or if a sufficiently precise description of the LCG 
employed by these functions is available, then we don't have to worry 
about performance, since the functions will behave like on other 
platforms.

As far as I can see, the multiplier and the addend of the LCG are 
described by the man page, at least on the nearest Unix box I saw, so it 
seems like functional testing should not be a grave consideration.

- Raw text -


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