Thread: Random numbers
View Single Post
Old 15 November 2020, 23:10   #8
son of 68k
meynaf's Avatar
Join Date: Nov 2007
Location: Lyon / France
Age: 48
Posts: 4,146
Originally Posted by Thomas Richter View Post
Note that if you use the output of this algorithm: Always use data from the MSBs on, do not generate random numbers by "masking", as the LSBs have a much smaller period.
There is another way to work around this shortcoming : just rotate the result.
This will not, however, fix the problem with the short period of the algorithm (for a 32-bit seed, it's in the thousands).
meynaf is offline  
Page generated in 0.04942 seconds with 11 queries