delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/11/20/20:15:07

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <199811210114.CAA24788@father.ludd.luth.se>
Subject: More rand()
To: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
Date: Sat, 21 Nov 1998 02:14:24 +0100 (MET)
X-Mailer: ELM [version 2.4ME+ PL15 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

While we are discussing rand(), may I ask if there's any interest in
adding the slew of *rand48() functions?

For those who don't know what those are, they are based on the formula
X(n+1) = (aX(n) + c) mod (2^48), where n >= 0, with the possibility to
change a and c and last but not least ~half of them take the (pseudo-)
random state as a parameter thus enabling the possibility of 
(hopefully) independent random numbers.


Barclay James Harvest, Mocking Bird,

							MartinS

- Raw text -


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