Click or drag to resize

RandMT64 Class

64-bit implementation of the Mersenne Twister random number generator algorithm by Makoto Matsumoto and Takuji Nishimura.
Inheritance Hierarchy
SystemObject
  SystemRandom
    Orthogonal.Common.Basic.PRNGRandCustomBase
      Orthogonal.Common.Basic.PRNGRandMT64

Namespace: Orthogonal.Common.Basic.PRNG
Assembly: Orthogonal.Common.Basic (in Orthogonal.Common.Basic.dll) Version: 2024-04-15 18:00 GMT+10.f27da1471008deaf16b803c17e24a5955690aef1
Syntax
C#
public class RandMT64 : RandCustomBase

The RandMT64 type exposes the following members.

Constructors
 NameDescription
Public methodRandMT64 Constructs a 64-bit Mersenne Twister with a random seed;
Public methodRandMT64(Int64) Creates a random number generator seeded with a specified integer.
Public methodRandMT64(Int64) Creates a random number generator seeded with a specified integer array.
Top
Methods
 NameDescription
Public methodNextInt64
(Overrides RandCustomBaseNextInt64)
Top
Remarks

The output sequence has been verified against the Mersenne Twister 64bit version reference output.

Long running tests have observed the expected minimum values Next 0 (0x0) from Core 0.000000000176224 and the expected maximum Next 2147483646 (0x7FFFFFFE) from Core 0.999999999743322.

A Core 0.0 is unlikely to be seen because there is a vanishing chance of seeing the limit values of 0x0000000000000000 and 0xFFFFFFFFFFFFFFFF in a flat random distribution of 64 bit values.

See Also