delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/03/06:56:54

From: locke AT mcs DOT net (Peter Johnson)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Random numbers
Date: Mon, 03 May 1999 02:25:41 GMT
Organization: BiLogic Productions
Lines: 20
Message-ID: <372d08ec.15213843@news.cso.uiuc.edu>
References: <wCsfVAALMML3Ew7U AT the-fabians DOT demon DOT co DOT uk>
NNTP-Posting-Host: isr3193.urh.uiuc.edu
Mime-Version: 1.0
X-Newsreader: Forte Agent 1.5/32.452
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

1. Yes, if the same random-number generator algorithm is used on both
machines.

2. Yes, this is how rand() works... look at the source to it (there's
other sources available on the web too).

Peter Johnson
locke AT mcs DOT net

On Sun, 2 May 1999 22:26:35 +0100, Richard Fabian
<richard AT the-fabians DOT demon DOT co DOT uk> wrote:

>Two questions related to random number generation:
>1. If you generate a set of random numbers using the same seed on
>different machines, do you get the same set?
>  (I want to make a fractal landscape map that is the same for everyone)
>
>2. Is there a way to generate random numbers without accessing the
>rand() function. (i.e. is there an algorithmic way to generate rand())

- Raw text -


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