Mersenne Twister in C, C++, C# (original) (raw)
RandomLib is a C++ interface to the Mersenne Twister random number generator, MT19937. It provides convenient access to random integers and reals at a variety of precisions. The emphasis in this implementation is on providing a reliable source of random numbers for scientific applications where there's a premium on accuracy, repeatability, portability, and ease of use. This library provides an improved method for seeding the generator with arrays and it allows access to both the 32- and 64-bit versions of MT19937. For more information, see
The code can be downloaded from