|
Period 2**128 - 1: Is it due to all zero state will never happen ?
You mean just two math.random(0) (128 bits) can predict the next one ?
Reading http://xoroshiro.di.unimi.it, it seems linearity is not that bad. BUT, why Vigna say never use last 2 bits to build double ? I am confused. The linear dependencies causing the failure of the binary-rank test can be reduced by applying a nonlinear operation on the output: for example, multiplying by a constant, or adding as 64-bit integers (thus, in the ring Z/264Z) two pieces of the state space. This is what happens in the generators described here. With more operations it could be possible to completely eliminate the linear artifacts, but I consider this a waste of time: as we've seen, some of the most used generators around have linear dependencies in every bit, and this is not considered a problem. Note also that when generating floating point values you never use the two lowest bits. |