Groupe d’études et de recherche en analyse des décisions

G-2004-98

On the Xorshift Random Number Generators

et

G. Marsaglia introduced recently a class of very fast xorshift random number generators, whose implementation uses three "xorshift" operations. They belong to a large family of generators based on linear recurrences modulo 2, which also includes shiftregister generators, the Mersenne twister, and several others. In this paper, we analyze the theoretical properties of xorshift generators, search for the best ones with respect to the equidistribution criterion, and test them empirically. We find that the vast majority of xorshift generators with only three xorshift operations, including those having good equidistribution, fail several simple statistical tests. We also discuss generators with more than three xorshifts.

, 19 pages