Subject: random number generators

From: [email-masked] (Dave Young)
Date: Wed, 15 Mar 1995 10:44:26 -0500

Hello,

	I am starting to do Quantum Monte Carlo calculations and
I am interested in the performance of random number generators.

	There have been a number of tests developed, the most trusted
seem to be those in "Seminumerical Algorithms" by Knuth.  And there
are a number of supplemental random number generators, such as the
ran3 generator in "Numerical Recipies".  It has also been demonstrated
that in the past the random number generators built into various 
programming languages were not to be trusted.

	My question is - Do the random number generators built into
the current generation of compilers pass statistical tests?

	I have tested the built in random number generators in
Borland C++ and GNU C++ and so far they have passed all tests
(working out of Knuth).  I would like to know if it is only C++ that
has a reliable random number generator implemented or if all
compilers are now reliable, or if it is only certain vendors even within
the C++ language?

	The reason that I would like to use built in random number
generators is that Knuth indicates that code written directly in 
assembly language can accomplish the task faster than code written in
standard source code.  The GNU C++ built in random number generator
is a factor of 2 faster than the ran3 generator using all available
compiler optimization.

				Dave Young
				[email-masked]
				youngdc@msucem

--------------------------------------------------------------------------
	It can be easily shown that certain methods are not applicable
to solving the many particle Schrodinger equation.
	However, it has not been shown that it is impossible to find
an analytic solution.
	The only question remaining is "Who will have the honor?"
--------------------------------------------------------------------------

---

From: [email-masked] (Dr. Tom Pierce)
Date: Wed, 15 Mar 1995 13:16:27 -0500 (EST)

> the current generation of compilers pass statistical tests?

A simple answer is "No". 

I think this topic is a permanent flame-war in sci.math.stat. 

The current publications of interest are 
"Monte Carlo Simulations: Hidden errors from "Good" Random number generators"
Phys. Rev. Letters 69(23), pp 3382 1992
  Specifically this article says ".. a specific algorithm must be tested
  together with the random number generator being used REGARDLESS of the
  tests which the generator has passed."

"Latest Development in Random Numbers", CERN Computer Newsletter 213, July-Sept.
pp 5-7, 1993.

and
"Ultra, The greatest random number generator that ever was or ever will be", by
Arif Zaman ([email-masked]) and George Marsaglia ([email-masked]), 1992.

My painful experience with compiler random number generators is that
one is far better off using a known and tested generator.            

-- 
Sincerely, Thomas Pierce - [email-masked]  -  Computational Chemist
"These opinions are those of the writer and not the Rohm and Haas Company."