我們計算了幾種常見的亂數產生器的基本性質,用以比較這些亂數產生器。我們考察了5種均勻分佈的亂數產生器:ran0、ran1、ran2、ranmar與roulet,以及由這些均勻亂數產生器衍生的指數分佈、高斯分佈的亂數產生器。其中高斯分佈的數據中,我們採用了兩種不同的產生高斯分佈的方法,原理上其中一種將得到嚴格的高斯分佈序列(gas1),而另一種應得到近似的高斯分佈序列(gas2)。 我們具體分析了這些序列的分佈函數、關聯函數[C1(k)與C2(k)]、一至四階矩與一至四階中心矩。我們發現,由ran0、ran1、ran2、ranmar所產生的序列,與對應的指數、高斯分佈的序列,其分佈函數與關聯函數對理論值的偏差值,會隨著序列的長度成冪次律衰減,roulet對應的嚴格高斯分佈的序列,其關聯函數的偏差值同樣會成冪次律衰減,這些冪次都接近於-1。對於均勻分佈與指數分佈,我們發現roulet的分佈函數是最好的,但關聯函數卻是最差的,ran0、ran1、ran2、ranmar則差別不大。另外,由ran0、ran1、ran2、ranmar衍生的高斯分佈的數據顯示,gas1與gas2的性質都差別不大,而roulet衍生的高斯分佈的數據中,嚴格的方法所得到的序列,其性質都比近似方法所得到的序列好。
We evaluate some basic properties of several often used random number generators. We examine five uniform random number generators named ran0, ran1, ran2, ranmar and roulet. We also analyze the random number generators with exponential and Gaussian distribution. In calculation, we use two different methods to generate Gaussian distribution. In principle one (named gas1) produces exact Gaussian sequence, and the other (named gas2) yields approximate Gaussian sequence. Especially, we evaluate the distribution functions, correlation functions [C1(k) and C2(k)], first to fourth moments and first to fourth center moments of the sequences obtained from the above generators. We find that for distribution functions, the square deviations from theoretical values decays in power law with increasing sequence length. For the exact Gaussian generator which is derived from Roulet, the square deviation of the colleration functions from theoretical values also decays in power law. Tne index of the power law is close to -1. For the uniform and exponential distribution, we find that roulet output the best distribution function, but the worst correlation function. Moreover, we do not find obvious difference for the sequences obtained from ran0, ran1, ran2 and ranmar. Similarly, there is also little difference for the sequences of gas1 and gas2 which are converted from the ran0, ran1, ran2 and ranmar. In contrast, for the Gaussian sequences converted from roulet, the exact method results in better result than the approximate method.