gakushin logo
tiny mt logo

Tiny Mersenne Twister (TinyMT):
A small-sized variant of Mersenne Twister *1.

Japanese Version


What is TinyMT

TinyMT is a new small-sized variant of Mersenne Twister (MT) introduced by Mutsuo Saito and Makoto Matsumoto in 2011. There are two types of TinyMT, tinymt32 and tinymt64. tinymt32 outputs 32-bit unsigned integers and single precision floating point numbers. On the other hand, tinymt64 outputs 64-bit unsigned integers and double precision floating point numbers.

The purpose of TinyMT is not to replace Mersenne Twister. TinyMT has far shorter period than Mersenne Twister. The merit of TinyMT is in its small size of the internal state of 127 bits, far smaller than 19937 of Mersenne Twister. The purpose of TinyMT may be used in a situation where large state generators such as Mersenne Twister are difficult to use. According to statistical test (BigCrush in TestU01 and AdaptiveCrush), the quality of the outputs of TinyMT seems pretty good, taking the small size of the internal state into consideration.

TinyMT has following features:

Download TinyMT

This code is released on June 20th in 2011, and it may contain some bugs. Any feedback is welcome (send an email to Mutsuo Saito, saito "at sign" and m-mat "at sign"

new! 1.1 Please download from:
GitHub TinyMT
BUG fix of floating point conversion. In version 1.0.3, tinymt32_generate_float() and tinymt64_generate_double() may return 1.0. (2015/4/24)
small changes about comments and coding styles. (2013/8/21)
random_util.hpp in dc/include is changed not to include openssl header. header files in tinymt are changed to fit to including from C++.(2013/2/1)
fix small bugs in check64.c and parse_opt.cpp.(2011/9/6)
The first version. (2011/6/20)

If you have some trouble to download, try this page.


TinyMT, as well as MT, can be used freely for any purpose, including commercial use. See LICENSE.txt for detail.

Back to Mersenne Twister Home Page
Back to SFMT Home Page
Back to MTGP Home Page

*1 This work is partially supported by JSPS Grant-in-Aid for Scientific Research No. 21654004.