Some Long-Period Random Number Generators using Shifts and Xors

224. R. P. Brent, Some long-period random number generators using shifts and xors, ANZIAM Journal 48 (CTAC2006), C188-C202, 2007.
Presented at the 13th Biennial Computational Techniques and Applications Conference (CTAC06), Townsville, 2-5 July 2006. arXiv:1004.3115v1

Preprint: dvi (17K), pdf (168K), ps (136K).



Marsaglia recently introduced a class of xorshift random number generators (RNGs) with periods 2n-1 for n = 32, 64, etc. Here we give a generalisation of Marsaglia's xorshift generators in order to obtain fast and high-quality RNGs with extremely long periods.

RNGs based on primitive trinomials may be unsatisfactory because a trinomial has very small weight. In contrast, our generators can be chosen so that their minimal polynomials have large weight (number of nonzero terms). A computer search using Magma has found good generators for n a power of two up to 4096. These have been implemented in a free software package xorgens.


In Section 3 of the paper the condition that the parameters (a, b, c, d) should be distinct was inadvertently omitted (it is stated in the associated file xortable.txt).
Thanks to George Spelvin for noticing this omission.

Go to next publication

Return to Richard Brent's index page