delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/03/03:01:07

Date: Mon, 3 May 1999 09:57:41 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Richard Fabian <richard AT the-fabians DOT demon DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Random numbers
In-Reply-To: <wCsfVAALMML3Ew7U@the-fabians.demon.co.uk>
Message-ID: <Pine.SUN.3.91.990503095644.4057L-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 2 May 1999, Richard Fabian wrote:

> 1. If you generate a set of random numbers using the same seed on
> different machines, do you get the same set?

No, because the implementation of the random number generators is
different on different platforms.

> 2. Is there a way to generate random numbers without accessing the
> rand() function.

You mean, you want to include your own random generator as part of the
program, right?

You could, of course, write your own version of `rand' (for starters,
the sources of the DJGPP implementation are freely available, and many
books on computer algorithms will show at least one random generator).

- Raw text -


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