Early in 1998 | Makoto Matsumoto and Takuji Nishimura
This paper introduces a new pseudorandom number generator named *Mersenne Twister* (MT), which is designed to generate uniform pseudorandom numbers. The generator is based on a linear recurrence over the two-element field $\mathbb{F}_2$ and achieves a super astronomical period of $2^{19937} - 1$ and 623-dimensional equidistribution up to 32-bit accuracy. The key features of MT include an *incomplete array* to realize a Mersenne-prime period and an *inversive-decimation method* for testing the primitivity of the characteristic polynomial. The generator is implemented as a portable C-code named *MT19937*, which has passed several stringent statistical tests, including diehard, and is comparable in speed to other modern generators. The paper also discusses the selection of parameters for optimal performance and provides a detailed description of the algorithm, including the explicit form of the matrix $B$ and the tempering transformations.This paper introduces a new pseudorandom number generator named *Mersenne Twister* (MT), which is designed to generate uniform pseudorandom numbers. The generator is based on a linear recurrence over the two-element field $\mathbb{F}_2$ and achieves a super astronomical period of $2^{19937} - 1$ and 623-dimensional equidistribution up to 32-bit accuracy. The key features of MT include an *incomplete array* to realize a Mersenne-prime period and an *inversive-decimation method* for testing the primitivity of the characteristic polynomial. The generator is implemented as a portable C-code named *MT19937*, which has passed several stringent statistical tests, including diehard, and is comparable in speed to other modern generators. The paper also discusses the selection of parameters for optimal performance and provides a detailed description of the algorithm, including the explicit form of the matrix $B$ and the tempering transformations.