2013-01-10 59 views

回答

3

一個很好的閱讀,你可以在這裏找到:java.util.Random’s Magic Number 0x5DEECE66D

和報價:

The analysis says it was chosen simply because researchers determined empirically 
that it produces a sequence of values satisfying various randomness tests 

Document給人以魔術數量射門偏出。

還有一個報價:

我又試圖爲十進制值,不包括Java的搜索,發現 在一些課堂筆記答案:

http://nut.bu.edu/~youssef/py502/monte_carlo_supplement.ps http://www.inf.ethz.ch/personal/gaertner/texts/own_work/random_matrices.pdf

and in some computer documentation: 

http://developer.apple.com/documentation/Darwin/Reference/ManPages/html/_rand48.3.html

The Youssef notes say: 

... I can only say that 25214903917_LONG and 11_LONG have 
apparently been chosen by passing a battery of such [meaning 
Marsaglia's DIEHARD] tests. 

... Even in the case of the 48-bit generators we are discussing 
today, cas26 will generate them all in a month or two of CPU time 
and then start to repeat. 
+0

第一個鏈接看起來死了。第二個沒有解決這個問題,它是關於'setSeed'方法中的異或操作。 – TonioElGringo

相關問題