*** Welcome to piglix ***

Mersenne twister


The Mersenne Twister is a pseudorandom number generator (PRNG). It is by far the most widely used general-purpose PRNG. Its name derives from the fact that its period length is chosen to be a Mersenne prime.

The Mersenne Twister was developed in 1997 by Makoto Matsumoto () (松本 眞?) and Takuji Nishimura (西村 拓士?). It was designed specifically to rectify most of the flaws found in older PRNGs. It was the first PRNG to provide fast generation of high-quality pseudorandom integers.

The most commonly used version of the Mersenne Twister algorithm is based on the Mersenne prime 219937−1. The standard implementation of that, MT19937, uses a 32-bit word length. There is another implementation that uses a 64-bit word length, MT19937-64; it generates a different sequence.

The Mersenne Twister is the default PRNG for the following software systems:

Microsoft Visual C++,Microsoft Excel,GAUSS,GLib,GNU Multiple Precision Arithmetic Library,GNU Octave,GNU Scientific Library,gretl,IDL,Julia,CMU Common Lisp,Embeddable Common Lisp,Steel Bank Common Lisp,Maple,MATLAB,Free Pascal,PHP,Python,R,Ruby,SageMath,Scilab,Stata. It is also available in Apache Commons, in standard C++ (since C++11), and in Mathematica. Add-on implementations are provided in many program libraries, including the Boost C++ Libraries, the CUDA Library, and the NAG Numerical Library.


...
Wikipedia

...