ARTICLE

Mersenne Twister Random Number Generator

Posted by Trevor Misfeldt Articles | Algorithms in C# April 01, 2003
The attached source code is the C# implementation of the Mersenne Twister algorithm, developed by Makoto Matsumoto and Takuji Nishimura in 1996-1997.
Reader Level:
Download Files:
 

The attached source code is the C# implementation of the Mersenne Twister algorithm, developed by Makoto Matsumoto and Takuji Nishimura in 1996-1997. This algorithm is faster and more efficient, and has a far longer period and far higher order of equidistribution, than other existing generators.

Login to add your contents and source code to this article
post comment
     

An update to Trevor's code, which implements System.Random and incorporates new research about the Mersenne Twister algorithm when generating double floating point values, can be found here: http://code.msdn.microsoft.com/MersenneTwister/ .

Posted by Code Kaizen Mar 22, 2008
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Get Career Advice from Experts