delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/10/05/01:58:04

To: ZRS <roalz AT varano DOT ing DOT unico DOT it>
Cc: djgpp <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: Re: Thanks for rand() problems.
Return-Receipt-To: peter AT deakin DOT edu DOT au
Date: Mon, 03 Oct 1994 10:28:51 +1000
From: Peter Horan <peter AT deakin DOT edu DOT au>

 > Last question: what about portable, VERY good random number generator 
> function??
> I know something about R250 and Marsaglia Random; any other out there?
Check out Park, S.K. and Miller, K.W. "Random Number Generators: Good ones are 
hard to find", CACM, Vol 31 No. 10, Oct 1988, pp 1192-1201

It is a survey of RNGs and recommends the use of 
	f(z) = (16897 * z) mod 2147483647
	     = (7^5 * z) mod (2^31 - 1)
as a "Minimal Standard". The paper gives several versions of this function as 
it requires MAXINT >= 2^46 - 1. It also surveysa a number of inadequate 
generators which have crept into readily available texts and software 
libraries.

Peter Horan                     School of Computing and Mathematics
peter AT deakin DOT edu DOT au	   	Deakin University
                                Geelong
+61-52-27 1234 (Voice)          Victoria 3217
+61-52-27 2028 (FAX)            Australia


- Raw text -


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