Use the following HTML code to embed the calculators within other websites:
Class WichHill
This class produces very good quality random numbers using the Wichmann-Hill algorithm.
It produces uniformly distributed pseudo-random 32-bit values with period of
To give you an idea of the running time for each of the functions, here are the
results for generating 100,000,000 random numbers on a 750MHz microprocessor :
genReal 18 seconds
genInt 44 seconds
floating point random numbers in the (0, 1) interval and then plotting them one versus the other.
It shows that the distribution is indeed uniform.
References:
B.A. Wichmann and I. D. Hill (1982). Algorithm AS 183: "An Efficient and Portable Pseudo-random Number Generator", Applied Statistics, 31, 188-190; Remarks: 34,p.198 and 35, p.89.
The Newran03 random number generator library of Robert Davies, http://www.robertnz.net/nr03doc.htm
Example 1
The following example displays 20 random large integers.
Obviously the output will always be the same as the seed of the generator A never changes.