109 UINT32_C(0x9908b0df),
110 UINT64_C(0xb5026f5aa96619e9)
115 UINT32_C(0x9d2c5680),
116 UINT64_C(0x71d67fffeda60000)
121 UINT32_C(0xefc60000),
122 UINT64_C(0xfff7eee000000000)
127 UINT32_C(0xffffffff),
128 UINT64_C(0x5555555555555555)
157 UINT32_C(1812433253),
158 UINT64_C(6364136223846793005)
169 UINT32_C(0x7fffffff),
233 for (uint32_t i = 1; i < kN.
v32; ++i)
248 for (uint64_t i = 1; i < kN.
v64; ++i)
258 for (; i < kN.
v32 - kM.
v32; ++i) {
263 for (; i < kN.
v32 - 1; ++i) {
277 for (; i < kN.
v64 - kM.
v64; ++i) {
282 for (; i < kN.
v64 - 1; ++i) {
304 y ^= (y >> kU.
v32) & kD.
v32;
305 y ^= (y << kS.
v32) & kB.
v32;
306 y ^= (y << kT.
v32) & kC.
v32;
323 y ^= (y >> kU.
v64) & kD.
v64;
324 y ^= (y << kS.
v64) & kB.
v64;
325 y ^= (y << kT.
v64) & kC.
v64;
332 const double twom32 = 0x1p-32;
337 const double twom64 = 0x1p-64;
342 static bool valid =
FALSE;
343 static double res_next = 0.;
356 const double f = sqrt(-2. * log(s) / s);
struct _initializedstuff v32
static const struct _integer kD
The XOR mask used as parameter d in the tempering process of the generation algorithm.
static const struct _integer kA
The XOR mask applied as the linear function on each twist.
static struct _internalstate iState
Internal state.
static struct _librarystate lState
Library state.
static const struct _integer kDefaultSeed
The default seed used on construction or seeding.
int32_t c_rand64_init(void)
void c_rand32_seed(uint32_t seed)
static const struct _integer kC
The XOR mask used as parameter c in the tempering process of the generation algorithm.
void c_rand32_deinit(void)
static const struct _integer kS
The shift size of parameter s used in the tempering process of the generation algorithm.
uint64_t c_rand64_int(void)
uint32_t c_rand32_int(void)
static const struct _integer kLowerMask
The mask with 31 1's, where 31 is the number of bits that mark the separation point of words on each ...
static const struct _integer kF
The initialization multiplier used to seed the state sequence when a single value is used as seed...
int32_t c_rand32_init(void)
static const struct _integer kU
The shift size of parameter u used in the tempering process of the generation algorithm.
static const struct _integer kT
The shift size of parameter t used in the tempering process of the generation algorithm.
void * c_malloc(size_t size)
static const struct _integer kB
The XOR mask used as parameter b in the tempering process of the generation algorithm.
Generic wrappers to platform-dependent functions.
static const struct _integer kM
The shift size used on twists to transform the values.
double c_rand64_normal(void)
#define INIT_C_LOGGER(fname, mname)
static const struct _integer kW
The number of bits of each word in the state sequence.
void c_rand64_deinit(void)
Pseudo-random number generator implemented on MT19937.
struct _initializedstuff v64
static void _twist64(void)
#define c_use_decl_annotations
void c_rand64_seed(uint64_t seed)
static const struct _integer kN
The number of elements in the state sequence (degree of recurrence).
static const struct _integer kL
The shift size of parameter l used in the tempering process of the generation algorithm.
struct _statevector vector
static void _twist32(void)