Super period
http://en.wikipedia.org/wiki/Linear_..._in_common_use
One of the random number generators in Java extract the higher-order bits of the random number in order to get a longer period. I'm not sure if I understand how this is done. Suppose that the random number r = 0000 1100 1000 1101. If we extract the 16 most significant bits from r; is the new number r = 0000 1100 or r = 0000 1100 0000 0000? |
You have your bit counts a bit mixed up.
Code:
A 48 bit random number, the internal value Xn |
If I have understood this correctly the 48 bits will be saved and used when generating the next random number. But what is returned as the random number to the calling application are the 32 higher-order bits of the generated number?
|
All times are GMT -5. The time now is 08:38 PM. |