src/random.c File Reference

#include <math.h>
#include <sys/time.h>
#include <stdlib.h>
#include <it/vec.h>
#include <it/random.h>

Go to the source code of this file.

Defines

#define MSB   0x80000000UL
#define LSB   0x7fffffffUL
#define N   624
#define M   397
#define A   0x9908b0dfUL
#define MIXBITS(u, v)   ( ((u) & MSB) | ((v) & LSB) )
#define TWIST(u, v)   ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? A : 0UL))
#define MT199737_STATE_INITIALIZER   { 0x7036c3e9UL, 0x67b6b695UL, 0x0b2ac651UL, 0xe3a3ebddUL, 0x891b18f9UL, 0x43f0a465UL, 0x4471c5e1UL, 0x5c08e22dUL, 0x08c66709UL, 0x8124f735UL, 0x425ca671UL, 0x7f16057dUL, 0xe866be19UL, 0x10067f05UL, 0xa8abf801UL, 0xc54ea5cdUL, 0xa4332e29UL, 0x447d0bd5UL, 0x3d914a91UL, 0xf8b3131dUL, 0x527bc739UL, 0x1d756da5UL, 0xfb3f2e21UL, 0x95109d6dUL, 0xd3b99949UL, 0x91b17475UL, 0x227932b1UL, 0xf55194bdUL, 0x2b9eb459UL, 0xb197f045UL, 0xde23e841UL, 0x9dcd490dUL, 0x13262869UL, 0x6e04b115UL, 0x07d4ded1UL, 0xf3980a5dUL, 0xd3a40579UL, 0xd41886e5UL, 0x9d62a661UL, 0xb0d328adUL, 0x7ad55b89UL, 0x8e0941b5UL, 0x7774cef1UL, 0x65fcf3fdUL, 0x77f03a99UL, 0x78f1b185UL, 0xd113e881UL, 0x5840bc4dUL, 0xb1b3b2a9UL, 0x1fa1a655UL, 0x30398311UL, 0x0cc6d19dUL, 0x2577d3b9UL, 0xea6df025UL, 0x3f602ea1UL, 0xd10483edUL, 0x1f3dadc9UL, 0xd4005ef5UL, 0x28137b31UL, 0x900c233dUL, 0x1abf50d9UL, 0x7327c2c5UL, 0xfe7ff8c1UL, 0x44dcff8dUL, 0x5d7fcce9UL, 0x29a7eb95UL, 0xce033751UL, 0x59b368ddUL, 0x59db31f9UL, 0x4809a965UL, 0xd6bbc6e1UL, 0x4458af2dUL, 0xeb169009UL, 0xf66acc35UL, 0x8c193771UL, 0xaf73227dUL, 0x7a6ff719UL, 0xb24e2405UL, 0xe46c1901UL, 0x80d612cdUL, 0x1d2e7729UL, 0x316b80d5UL, 0x8975fb91UL, 0x0cd1d01dUL, 0xbbb22039UL, 0x797fb2a5UL, 0x79f96f21UL, 0xc683aa6dUL, 0x51840249UL, 0xfd1c8975UL, 0xac4a03b1UL, 0xbd25f1bdUL, 0x56662d59UL, 0x8d78d545UL, 0x41dc4941UL, 0x365ff60dUL, 0x6063b169UL, 0xf1406615UL, 0xdbd5cfd1UL, 0xb596075dUL, 0x0ee09e79UL, 0xf0640be5UL, 0xa09d2761UL, 0xc03975adUL, 0x4eaa0489UL, 0xa4e996b5UL, 0x8269dff1UL, 0xaf1890fdUL, 0x0705f399UL, 0xe0bbd685UL, 0x56d48981UL, 0xdcaea94dUL, 0x3fc37ba9UL, 0x787a9b55UL, 0x4f66b411UL, 0x80740e9dUL, 0xd04aacb9UL, 0x434ab525UL, 0x632aefa1UL, 0x872e10edUL, 0xa7ac96c9UL, 0x9fa5f3f5UL, 0x393ccc31UL, 0xb83f003dUL, 0xbdb349d9UL, 0x4d2b27c5UL, 0x2458d9c1UL, 0x77f62c8dUL, 0xbcf1d5e9UL, 0x6b6e2095UL, 0xbf6ca851UL, 0x76dfe5ddUL, 0x75d44af9UL, 0x6dc7ae65UL, 0xbb26c7e1UL, 0x9e157c2dUL, 0x2aafb909UL, 0xd425a135UL, 0x6c86c871UL, 0x888d3f7dUL, 0xc4d23019UL, 0x78dac905UL, 0xac6d3a01UL, 0xd96a7fcdUL, 0x0292c029UL, 0x436ef5d5UL, 0x982bac91UL, 0xbf4d8d1dUL, 0xae617939UL, 0x106ef7a5UL, 0xc314b021UL, 0xf4a3b76dUL, 0xeed76b49UL, 0x9e3c9e75UL, 0x690bd4b1UL, 0x8cf74ebdUL, 0xbfc6a659UL, 0x4edeba45UL, 0x3215aa41UL, 0xdf3fa30dUL, 0xa44a3a69UL, 0x8ed11b15UL, 0x16e7c0d1UL, 0xdd31045dUL, 0xa1d63779UL, 0xb0d490e5UL, 0xf678a861UL, 0x278cc2adUL, 0x9447ad89UL, 0x0ebeebb5UL, 0x6c8ff0f1UL, 0x2f712dfdUL, 0xeaf4ac99UL, 0x3f4afb85UL, 0x79562a81UL, 0xb4a9964dUL, 0xdebc44a9UL, 0x30e89055UL, 0x89e4e511UL, 0xf0fe4b9dUL, 0x311685b9UL, 0xf98c7a25UL, 0x71d6b0a1UL, 0xc0849dedUL, 0x84247fc9UL, 0x2b8088f5UL, 0xe5d71d31UL, 0x16eedd3dUL, 0x5bc042d9UL, 0x7f338cc5UL, 0x0732bac1UL, 0x11dc598dUL, 0xd78cdee9UL, 0xa2095595UL, 0x90671951UL, 0xf82962ddUL, 0x360663f9UL, 0xfa2ab365UL, 0x32b2c8e1UL, 0x763f492dUL, 0x3091e209UL, 0x2f557635UL, 0xb4a55971UL, 0x67645c7dUL, 0x408d6919UL, 0x48ac6e05UL, 0x61af5b01UL, 0x7c0beccdUL, 0xdd600929UL, 0x2f876ad5UL, 0x5ab25d91UL, 0x0d264a1dUL, 0xc389d239UL, 0x67433ca5UL, 0x5790f121UL, 0x6c70c46dUL, 0x54b3d449UL, 0xca11b375UL, 0x69bea5b1UL, 0x01c5abbdUL, 0x20c01f59UL, 0x1ac99f45UL, 0x4fd00b41UL, 0x856c500dUL, 0xa7d9c369UL, 0x3bb6d015UL, 0xea0ab1d1UL, 0xa769015dUL, 0x6584d079UL, 0xda6a15e5UL, 0x5ff52961UL, 0x73cd0fadUL, 0x34ae5689UL, 0x608940b5UL, 0x86e701f1UL, 0xc406cafdUL, 0x1cbc6599UL, 0xf99f2085UL, 0x1998cb81UL, 0x0d31834dUL, 0x979e0da9UL, 0x7deb8555UL, 0x50b41611UL, 0xdb65889dUL, 0x60db5eb9UL, 0x12333f25UL, 0x6c6371a1UL, 0x4a082aedUL, 0xdda568c9UL, 0x4c901df5UL, 0xbee26e31UL, 0xc91bba3dUL, 0x2de63bd9UL, 0xae40f1c5UL, 0xc80d9bc1UL, 0x7f8f868dUL, 0xf650e7e9UL, 0x42798a95UL, 0xf1f28a51UL, 0x9a8fdfddUL, 0xf3717cf9UL, 0x3232b865UL, 0x7e5fc9e1UL, 0xd9d6162dUL, 0x65bd0b09UL, 0x1cfa4b35UL, 0x3574ea71UL, 0xa8f8797dUL, 0x66a1a219UL, 0x06c31305UL, 0x65327c01UL, 0x15ba59cdUL, 0x36965229UL, 0xaab4dfd5UL, 0xc20a0e91UL, 0xf35c071dUL, 0x942b2b39UL, 0x02fc81a5UL, 0xb86e3221UL, 0x7aead16dUL, 0x2c193d49UL, 0xd59bc875UL, 0xbf6276b1UL, 0xb89108bdUL, 0x32529859UL, 0x16398445UL, 0x3c0b6c41UL, 0x15e5fd0dUL, 0x34124c69UL, 0xecf18515UL, 0x863ea2d1UL, 0x513dfe5dUL, 0x32ec6979UL, 0x32249ae5UL, 0x9e12aa61UL, 0x31fa5cadUL, 0x18ddff89UL, 0x2f4895b5UL, 0x226f12f1UL, 0x49d967fdUL, 0x955d1e99UL, 0x74b84585UL, 0x189c6c81UL, 0x1346704dUL, 0x7368d6a9UL, 0x94837a55UL, 0x14d44711UL, 0xbca9c59dUL, 0x789937b9UL, 0x923f0425UL, 0x53d132a1UL, 0xf0b8b7edUL, 0xdd2f51c9UL, 0xd7d4b2f5UL, 0x555ebf31UL, 0xebc5973dUL, 0x6d2534d9UL, 0x7f5356c5UL, 0x87e97cc1UL, 0x2e0fb38dUL, 0x623df0e9UL, 0xc1bebf95UL, 0x950efb51UL, 0x1b135cddUL, 0x071595f9UL, 0x5adfbd65UL, 0xdf2dcae1UL, 0xd5d9e32dUL, 0x33313409UL, 0xb2142035UL, 0xbff57b71UL, 0xaa49967dUL, 0xb00edb19UL, 0x981eb805UL, 0x17f69d01UL, 0x5375c6cdUL, 0x97359b29UL, 0x69f754d5UL, 0xbf32bf91UL, 0x6eeec41dUL, 0xb9458439UL, 0x689ac6a5UL, 0x66ac7321UL, 0x6d11de6dUL, 0x1e07a649UL, 0x15dadd75UL, 0x7af747b1UL, 0x4e5965bdUL, 0xad7e1159UL, 0x662e6945UL, 0x97c7cd41UL, 0x7dacaa0dUL, 0x11f3d569UL, 0x97813a15UL, 0x1c8393d1UL, 0x17affb5dUL, 0xe30d0279UL, 0x7d041fe5UL, 0x71d12b61UL, 0xef14a9adUL, 0x29d6a889UL, 0x0ffceab5UL, 0x902823f1UL, 0x9de904fdUL, 0x4dd6d799UL, 0x15966a85UL, 0x57610d81UL, 0xf3e85d4dUL, 0x7b1c9fa9UL, 0xa9b06f55UL, 0x47457811UL, 0x11cb029dUL, 0x915010b9UL, 0x7eafc925UL, 0x291ff3a1UL, 0x819644edUL, 0xabc23ac9UL, 0xa24e47f5UL, 0x3a4c1031UL, 0x9bec743dUL, 0x527d2dd9UL, 0x976abbc5UL, 0x67c65dc1UL, 0x8a5ce08dUL, 0x6453f9e9UL, 0x94d8f495UL, 0x2abc6c51UL, 0x36b3d9ddUL, 0xc9f2aef9UL, 0xb931c265UL, 0x961ccbe1UL, 0x774ab02dUL, 0x01ee5d09UL, 0x03a2f535UL, 0x25270c71UL, 0xc857b37dUL, 0x95d51419UL, 0xe1bf5d05UL, 0xdafbbe01UL, 0xe23e33cdUL, 0x883de429UL, 0x224ec9d5UL, 0x432c7091UL, 0x7cde811dUL, 0xcbd8dd39UL, 0x1d1e0ba5UL, 0xe34bb421UL, 0x8fe5eb6dUL, 0xd37f0f49UL, 0xdfcef275UL, 0xad7d18b1UL, 0x601ec2bdUL, 0x4b428a59UL, 0x2fa84e45UL, 0x04052e41UL, 0xa9c0570dUL, 0x0a7e5e69UL, 0x3065ef15UL, 0xddd984d1UL, 0x37bef85dUL, 0x4ee69b79UL, 0x8008a4e5UL, 0x9c30ac61UL, 0x381bf6adUL, 0x50985189UL, 0x97a63fb5UL, 0x211234f1UL, 0x9d35a1fdUL, 0x3f299099UL, 0x41398f85UL, 0xb6e6ae81UL, 0xdc174a4dUL, 0xb7b968a9UL, 0xf2726455UL, 0x5907a911UL, 0x57c93f9dUL, 0xc3ffe9b9UL, 0xdc858e25UL, 0xed4fb4a1UL, 0xc9a0d1edUL, 0x725e23c9UL, 0x80fcdcf5UL, 0xfeaa6131UL, 0xf690513dUL, 0x16ee26d9UL, 0x9b8720c5UL, 0x88a43ec1UL, 0x01770d8dUL, 0x459302e9UL, 0x30c82995UL, 0x63fadd51UL, 0xaa7156ddUL, 0x9508c7f9UL, 0x9228c765UL, 0xe42ccce1UL, 0xcb287d2dUL, 0x3af48609UL, 0x26a6ca35UL, 0x36099d71UL, 0x6022d07dUL, 0x90f44d19UL, 0xc8a50205UL, 0x0f41df01UL, 0x6f13a0cdUL, 0x92af2d29UL, 0x88bb3ed5UL, 0x3ef72191UL, 0x1a2b3e1dUL, 0x64e53639UL, 0xa58650a5UL, 0xaf4bf521UL, 0x3066f86dUL, 0xf57f7849UL, 0x88780775UL, 0x67f3e9b1UL, 0x8ae11fbdUL, 0xc4a00359UL, 0x97a73345UL, 0x21c38f41UL, 0x8721040dUL, 0xe6b1e769UL, 0xac9fa415UL, 0xfb4075d1UL, 0xee6af55dUL, 0x4f793479UL, 0x003229e5UL, 0xde312d61UL, 0x9a1043adUL, 0x7622fa89UL, 0x5b4494b5UL, 0x262d45f1UL, 0x24bf3efdUL, 0x62554999UL, 0x5ca1b485UL, 0x182d4f81UL, 0xf8d3374dUL, 0x323f31a9UL, 0xa3c95955UL, 0xbb1ada11UL, 0x0ba47c9dUL, 0x29a8c2b9UL, 0xb0c05325UL, 0xa16075a1UL, 0x95d85eedUL, 0x5a030cc9UL, 0x48e071f5UL, 0x3379b231UL, 0x18b12e3dUL, 0xf3781fd9UL, 0x30a885c5UL, 0x0b831fc1UL, 0x005e3a8dUL, 0x4efb0be9UL, 0x0a8c5e95UL, 0xf1ca4e51UL, 0x334bd3ddUL, 0xc157e0f9UL, 0x2ac4cc65UL, 0x0a5dcde1UL, 0xde734a2dUL, 0x4743af09UL, 0x301f9f35UL, 0xc39d2e71UL, 0xceaaed7dUL, 0x1a6c8619UL, 0x31cfa705UL, 0x15c90001UL, 0xa6f60dcdUL, 0x3f897629UL, 0x523cb3d5UL, 0xa392d291UL, 0x43d4fb1dUL, 0x1d6a8f39UL, 0x86d395a5UL, 0x4bad3621UL, 0x9b95056dUL, 0x2d08e149UL, 0x64d61c75UL, 0xbb5bbab1UL, 0x6ba07cbdUL, 0xd2967c59UL, 0xc32b1845UL, 0x9202f041UL, 0x02ceb10dUL, 0x6f8e7069UL, 0x012e5915UL, 0xa5b866d1UL, 0x78b3f25dUL, 0xbdc4cd79UL, 0xc280aee5UL, 0xf8d2ae61UL, 0xa1f190adUL, 0x8376a389UL, 0xefd7e9b5UL, 0xf07956f1UL, 0x1185dbfdUL, 0xb05a0299UL, 0xccced985UL, 0x5c34f081UL, 0x771c244dUL, 0xf3adfaa9UL, 0xf2b54e55UL, 0xde7f0b11UL, 0xaa5cb99dUL, 0xdb4a9bb9UL, 0x00601825UL, 0x465236a1UL, 0xb33cebedUL, 0x8bb0f5c9UL, 0xcef906f5UL, 0x69ba0331UL, 0x1f4f0b3dUL, 0x211b18d9UL, 0xfbceeac5UL, 0x116300c1UL, 0xf412678dUL, 0xc98c14e9UL, 0x97259395UL, 0x852abf51UL, 0x8e4350ddUL, 0xa7dff9f9UL, 0xc805d165UL, 0x49afcee1UL, 0xbe2b172dUL, 0x8fdbd809UL, 0x350d7435UL, 0x9ee1bf71UL, 0x70f00a7dUL, 0xab3dbf19UL, 0x023f4c05UL, 0x4f912101UL, 0x36e57acdUL, 0x17ccbf29UL, 0x33d328d5UL, 0x61ff8391UL, 0xf6dbb81dUL, 0x8e68e839UL, 0x4605daa5UL, 0x396f7721UL, 0x1e70126dUL, 0x231b4a49UL, 0xc9e93175UL, 0xb8b48bb1UL, 0x9f5cd9bdUL, 0x2e25f559UL, 0xd733fd45UL, 0xf5c35141UL, 0x09c95e0dUL, 0x6e13f969UL, 0x23120e15UL, 0x0e4157d1UL, 0x1399ef5dUL, 0x72c96679UL, 0x8bf433e5UL, 0xad152f61UL, 0xdcbfddadUL, 0x61934c89UL, 0xea603eb5UL, 0xd0f667f1UL, 0x408978fdUL, 0x2237bb99UL, 0xf6c0fe85UL, 0x63fd9181UL, 0x83f2114dUL }
#define ZIGLEVELS   256
#define ZIGR   3.6554204190269
#define ZIGRINV   0.2735663440503
#define ZIGV   0.0049287609634869

Typedefs

typedef unsigned int it_uint32_t

Functions

void mt19937_srand (it_uint32_t seed)
void mt19937_srand_by_array (it_uint32_t init_key[], it_uint32_t key_length)
static void mt19937_next_state (void)
unsigned int mt19937_rand_int32 (void)
int mt19937_rand_int31 (void)
double mt19937_rand_real1 (void)
double mt19937_rand_real2 (void)
double mt19937_rand_real3 (void)
double mt19937_rand_res53 (void)
static double mt19937_rand ()
void it_randomize (void)
void it_seed (int seed)
double it_rand (void)
double it_randn (void)
double it_randpdf (double a, double b, it_function_t pdf, it_args_t args)
int it_rand_memoryless (vec pdf)

Variables

static it_uint32_t state [N] = MT199737_STATE_INITIALIZER
static int left = 1
static int initf = 0
static it_uint32_tnext
static int idx = 0
static const unsigned long int zkn [ZIGLEVELS]
static const double zfn [ZIGLEVELS]
static const double zwn [ZIGLEVELS]


Define Documentation

#define A   0x9908b0dfUL

Definition at line 85 of file random.c.

Referenced by mat_svd().

#define LSB   0x7fffffffUL

Definition at line 82 of file random.c.

#define M   397

Definition at line 84 of file random.c.

Referenced by main(), and mt19937_next_state().

#define MIXBITS ( u,
 )     ( ((u) & MSB) | ((v) & LSB) )

Definition at line 86 of file random.c.

#define MSB   0x80000000UL

Definition at line 81 of file random.c.

#define MT199737_STATE_INITIALIZER   { 0x7036c3e9UL, 0x67b6b695UL, 0x0b2ac651UL, 0xe3a3ebddUL, 0x891b18f9UL, 0x43f0a465UL, 0x4471c5e1UL, 0x5c08e22dUL, 0x08c66709UL, 0x8124f735UL, 0x425ca671UL, 0x7f16057dUL, 0xe866be19UL, 0x10067f05UL, 0xa8abf801UL, 0xc54ea5cdUL, 0xa4332e29UL, 0x447d0bd5UL, 0x3d914a91UL, 0xf8b3131dUL, 0x527bc739UL, 0x1d756da5UL, 0xfb3f2e21UL, 0x95109d6dUL, 0xd3b99949UL, 0x91b17475UL, 0x227932b1UL, 0xf55194bdUL, 0x2b9eb459UL, 0xb197f045UL, 0xde23e841UL, 0x9dcd490dUL, 0x13262869UL, 0x6e04b115UL, 0x07d4ded1UL, 0xf3980a5dUL, 0xd3a40579UL, 0xd41886e5UL, 0x9d62a661UL, 0xb0d328adUL, 0x7ad55b89UL, 0x8e0941b5UL, 0x7774cef1UL, 0x65fcf3fdUL, 0x77f03a99UL, 0x78f1b185UL, 0xd113e881UL, 0x5840bc4dUL, 0xb1b3b2a9UL, 0x1fa1a655UL, 0x30398311UL, 0x0cc6d19dUL, 0x2577d3b9UL, 0xea6df025UL, 0x3f602ea1UL, 0xd10483edUL, 0x1f3dadc9UL, 0xd4005ef5UL, 0x28137b31UL, 0x900c233dUL, 0x1abf50d9UL, 0x7327c2c5UL, 0xfe7ff8c1UL, 0x44dcff8dUL, 0x5d7fcce9UL, 0x29a7eb95UL, 0xce033751UL, 0x59b368ddUL, 0x59db31f9UL, 0x4809a965UL, 0xd6bbc6e1UL, 0x4458af2dUL, 0xeb169009UL, 0xf66acc35UL, 0x8c193771UL, 0xaf73227dUL, 0x7a6ff719UL, 0xb24e2405UL, 0xe46c1901UL, 0x80d612cdUL, 0x1d2e7729UL, 0x316b80d5UL, 0x8975fb91UL, 0x0cd1d01dUL, 0xbbb22039UL, 0x797fb2a5UL, 0x79f96f21UL, 0xc683aa6dUL, 0x51840249UL, 0xfd1c8975UL, 0xac4a03b1UL, 0xbd25f1bdUL, 0x56662d59UL, 0x8d78d545UL, 0x41dc4941UL, 0x365ff60dUL, 0x6063b169UL, 0xf1406615UL, 0xdbd5cfd1UL, 0xb596075dUL, 0x0ee09e79UL, 0xf0640be5UL, 0xa09d2761UL, 0xc03975adUL, 0x4eaa0489UL, 0xa4e996b5UL, 0x8269dff1UL, 0xaf1890fdUL, 0x0705f399UL, 0xe0bbd685UL, 0x56d48981UL, 0xdcaea94dUL, 0x3fc37ba9UL, 0x787a9b55UL, 0x4f66b411UL, 0x80740e9dUL, 0xd04aacb9UL, 0x434ab525UL, 0x632aefa1UL, 0x872e10edUL, 0xa7ac96c9UL, 0x9fa5f3f5UL, 0x393ccc31UL, 0xb83f003dUL, 0xbdb349d9UL, 0x4d2b27c5UL, 0x2458d9c1UL, 0x77f62c8dUL, 0xbcf1d5e9UL, 0x6b6e2095UL, 0xbf6ca851UL, 0x76dfe5ddUL, 0x75d44af9UL, 0x6dc7ae65UL, 0xbb26c7e1UL, 0x9e157c2dUL, 0x2aafb909UL, 0xd425a135UL, 0x6c86c871UL, 0x888d3f7dUL, 0xc4d23019UL, 0x78dac905UL, 0xac6d3a01UL, 0xd96a7fcdUL, 0x0292c029UL, 0x436ef5d5UL, 0x982bac91UL, 0xbf4d8d1dUL, 0xae617939UL, 0x106ef7a5UL, 0xc314b021UL, 0xf4a3b76dUL, 0xeed76b49UL, 0x9e3c9e75UL, 0x690bd4b1UL, 0x8cf74ebdUL, 0xbfc6a659UL, 0x4edeba45UL, 0x3215aa41UL, 0xdf3fa30dUL, 0xa44a3a69UL, 0x8ed11b15UL, 0x16e7c0d1UL, 0xdd31045dUL, 0xa1d63779UL, 0xb0d490e5UL, 0xf678a861UL, 0x278cc2adUL, 0x9447ad89UL, 0x0ebeebb5UL, 0x6c8ff0f1UL, 0x2f712dfdUL, 0xeaf4ac99UL, 0x3f4afb85UL, 0x79562a81UL, 0xb4a9964dUL, 0xdebc44a9UL, 0x30e89055UL, 0x89e4e511UL, 0xf0fe4b9dUL, 0x311685b9UL, 0xf98c7a25UL, 0x71d6b0a1UL, 0xc0849dedUL, 0x84247fc9UL, 0x2b8088f5UL, 0xe5d71d31UL, 0x16eedd3dUL, 0x5bc042d9UL, 0x7f338cc5UL, 0x0732bac1UL, 0x11dc598dUL, 0xd78cdee9UL, 0xa2095595UL, 0x90671951UL, 0xf82962ddUL, 0x360663f9UL, 0xfa2ab365UL, 0x32b2c8e1UL, 0x763f492dUL, 0x3091e209UL, 0x2f557635UL, 0xb4a55971UL, 0x67645c7dUL, 0x408d6919UL, 0x48ac6e05UL, 0x61af5b01UL, 0x7c0beccdUL, 0xdd600929UL, 0x2f876ad5UL, 0x5ab25d91UL, 0x0d264a1dUL, 0xc389d239UL, 0x67433ca5UL, 0x5790f121UL, 0x6c70c46dUL, 0x54b3d449UL, 0xca11b375UL, 0x69bea5b1UL, 0x01c5abbdUL, 0x20c01f59UL, 0x1ac99f45UL, 0x4fd00b41UL, 0x856c500dUL, 0xa7d9c369UL, 0x3bb6d015UL, 0xea0ab1d1UL, 0xa769015dUL, 0x6584d079UL, 0xda6a15e5UL, 0x5ff52961UL, 0x73cd0fadUL, 0x34ae5689UL, 0x608940b5UL, 0x86e701f1UL, 0xc406cafdUL, 0x1cbc6599UL, 0xf99f2085UL, 0x1998cb81UL, 0x0d31834dUL, 0x979e0da9UL, 0x7deb8555UL, 0x50b41611UL, 0xdb65889dUL, 0x60db5eb9UL, 0x12333f25UL, 0x6c6371a1UL, 0x4a082aedUL, 0xdda568c9UL, 0x4c901df5UL, 0xbee26e31UL, 0xc91bba3dUL, 0x2de63bd9UL, 0xae40f1c5UL, 0xc80d9bc1UL, 0x7f8f868dUL, 0xf650e7e9UL, 0x42798a95UL, 0xf1f28a51UL, 0x9a8fdfddUL, 0xf3717cf9UL, 0x3232b865UL, 0x7e5fc9e1UL, 0xd9d6162dUL, 0x65bd0b09UL, 0x1cfa4b35UL, 0x3574ea71UL, 0xa8f8797dUL, 0x66a1a219UL, 0x06c31305UL, 0x65327c01UL, 0x15ba59cdUL, 0x36965229UL, 0xaab4dfd5UL, 0xc20a0e91UL, 0xf35c071dUL, 0x942b2b39UL, 0x02fc81a5UL, 0xb86e3221UL, 0x7aead16dUL, 0x2c193d49UL, 0xd59bc875UL, 0xbf6276b1UL, 0xb89108bdUL, 0x32529859UL, 0x16398445UL, 0x3c0b6c41UL, 0x15e5fd0dUL, 0x34124c69UL, 0xecf18515UL, 0x863ea2d1UL, 0x513dfe5dUL, 0x32ec6979UL, 0x32249ae5UL, 0x9e12aa61UL, 0x31fa5cadUL, 0x18ddff89UL, 0x2f4895b5UL, 0x226f12f1UL, 0x49d967fdUL, 0x955d1e99UL, 0x74b84585UL, 0x189c6c81UL, 0x1346704dUL, 0x7368d6a9UL, 0x94837a55UL, 0x14d44711UL, 0xbca9c59dUL, 0x789937b9UL, 0x923f0425UL, 0x53d132a1UL, 0xf0b8b7edUL, 0xdd2f51c9UL, 0xd7d4b2f5UL, 0x555ebf31UL, 0xebc5973dUL, 0x6d2534d9UL, 0x7f5356c5UL, 0x87e97cc1UL, 0x2e0fb38dUL, 0x623df0e9UL, 0xc1bebf95UL, 0x950efb51UL, 0x1b135cddUL, 0x071595f9UL, 0x5adfbd65UL, 0xdf2dcae1UL, 0xd5d9e32dUL, 0x33313409UL, 0xb2142035UL, 0xbff57b71UL, 0xaa49967dUL, 0xb00edb19UL, 0x981eb805UL, 0x17f69d01UL, 0x5375c6cdUL, 0x97359b29UL, 0x69f754d5UL, 0xbf32bf91UL, 0x6eeec41dUL, 0xb9458439UL, 0x689ac6a5UL, 0x66ac7321UL, 0x6d11de6dUL, 0x1e07a649UL, 0x15dadd75UL, 0x7af747b1UL, 0x4e5965bdUL, 0xad7e1159UL, 0x662e6945UL, 0x97c7cd41UL, 0x7dacaa0dUL, 0x11f3d569UL, 0x97813a15UL, 0x1c8393d1UL, 0x17affb5dUL, 0xe30d0279UL, 0x7d041fe5UL, 0x71d12b61UL, 0xef14a9adUL, 0x29d6a889UL, 0x0ffceab5UL, 0x902823f1UL, 0x9de904fdUL, 0x4dd6d799UL, 0x15966a85UL, 0x57610d81UL, 0xf3e85d4dUL, 0x7b1c9fa9UL, 0xa9b06f55UL, 0x47457811UL, 0x11cb029dUL, 0x915010b9UL, 0x7eafc925UL, 0x291ff3a1UL, 0x819644edUL, 0xabc23ac9UL, 0xa24e47f5UL, 0x3a4c1031UL, 0x9bec743dUL, 0x527d2dd9UL, 0x976abbc5UL, 0x67c65dc1UL, 0x8a5ce08dUL, 0x6453f9e9UL, 0x94d8f495UL, 0x2abc6c51UL, 0x36b3d9ddUL, 0xc9f2aef9UL, 0xb931c265UL, 0x961ccbe1UL, 0x774ab02dUL, 0x01ee5d09UL, 0x03a2f535UL, 0x25270c71UL, 0xc857b37dUL, 0x95d51419UL, 0xe1bf5d05UL, 0xdafbbe01UL, 0xe23e33cdUL, 0x883de429UL, 0x224ec9d5UL, 0x432c7091UL, 0x7cde811dUL, 0xcbd8dd39UL, 0x1d1e0ba5UL, 0xe34bb421UL, 0x8fe5eb6dUL, 0xd37f0f49UL, 0xdfcef275UL, 0xad7d18b1UL, 0x601ec2bdUL, 0x4b428a59UL, 0x2fa84e45UL, 0x04052e41UL, 0xa9c0570dUL, 0x0a7e5e69UL, 0x3065ef15UL, 0xddd984d1UL, 0x37bef85dUL, 0x4ee69b79UL, 0x8008a4e5UL, 0x9c30ac61UL, 0x381bf6adUL, 0x50985189UL, 0x97a63fb5UL, 0x211234f1UL, 0x9d35a1fdUL, 0x3f299099UL, 0x41398f85UL, 0xb6e6ae81UL, 0xdc174a4dUL, 0xb7b968a9UL, 0xf2726455UL, 0x5907a911UL, 0x57c93f9dUL, 0xc3ffe9b9UL, 0xdc858e25UL, 0xed4fb4a1UL, 0xc9a0d1edUL, 0x725e23c9UL, 0x80fcdcf5UL, 0xfeaa6131UL, 0xf690513dUL, 0x16ee26d9UL, 0x9b8720c5UL, 0x88a43ec1UL, 0x01770d8dUL, 0x459302e9UL, 0x30c82995UL, 0x63fadd51UL, 0xaa7156ddUL, 0x9508c7f9UL, 0x9228c765UL, 0xe42ccce1UL, 0xcb287d2dUL, 0x3af48609UL, 0x26a6ca35UL, 0x36099d71UL, 0x6022d07dUL, 0x90f44d19UL, 0xc8a50205UL, 0x0f41df01UL, 0x6f13a0cdUL, 0x92af2d29UL, 0x88bb3ed5UL, 0x3ef72191UL, 0x1a2b3e1dUL, 0x64e53639UL, 0xa58650a5UL, 0xaf4bf521UL, 0x3066f86dUL, 0xf57f7849UL, 0x88780775UL, 0x67f3e9b1UL, 0x8ae11fbdUL, 0xc4a00359UL, 0x97a73345UL, 0x21c38f41UL, 0x8721040dUL, 0xe6b1e769UL, 0xac9fa415UL, 0xfb4075d1UL, 0xee6af55dUL, 0x4f793479UL, 0x003229e5UL, 0xde312d61UL, 0x9a1043adUL, 0x7622fa89UL, 0x5b4494b5UL, 0x262d45f1UL, 0x24bf3efdUL, 0x62554999UL, 0x5ca1b485UL, 0x182d4f81UL, 0xf8d3374dUL, 0x323f31a9UL, 0xa3c95955UL, 0xbb1ada11UL, 0x0ba47c9dUL, 0x29a8c2b9UL, 0xb0c05325UL, 0xa16075a1UL, 0x95d85eedUL, 0x5a030cc9UL, 0x48e071f5UL, 0x3379b231UL, 0x18b12e3dUL, 0xf3781fd9UL, 0x30a885c5UL, 0x0b831fc1UL, 0x005e3a8dUL, 0x4efb0be9UL, 0x0a8c5e95UL, 0xf1ca4e51UL, 0x334bd3ddUL, 0xc157e0f9UL, 0x2ac4cc65UL, 0x0a5dcde1UL, 0xde734a2dUL, 0x4743af09UL, 0x301f9f35UL, 0xc39d2e71UL, 0xceaaed7dUL, 0x1a6c8619UL, 0x31cfa705UL, 0x15c90001UL, 0xa6f60dcdUL, 0x3f897629UL, 0x523cb3d5UL, 0xa392d291UL, 0x43d4fb1dUL, 0x1d6a8f39UL, 0x86d395a5UL, 0x4bad3621UL, 0x9b95056dUL, 0x2d08e149UL, 0x64d61c75UL, 0xbb5bbab1UL, 0x6ba07cbdUL, 0xd2967c59UL, 0xc32b1845UL, 0x9202f041UL, 0x02ceb10dUL, 0x6f8e7069UL, 0x012e5915UL, 0xa5b866d1UL, 0x78b3f25dUL, 0xbdc4cd79UL, 0xc280aee5UL, 0xf8d2ae61UL, 0xa1f190adUL, 0x8376a389UL, 0xefd7e9b5UL, 0xf07956f1UL, 0x1185dbfdUL, 0xb05a0299UL, 0xccced985UL, 0x5c34f081UL, 0x771c244dUL, 0xf3adfaa9UL, 0xf2b54e55UL, 0xde7f0b11UL, 0xaa5cb99dUL, 0xdb4a9bb9UL, 0x00601825UL, 0x465236a1UL, 0xb33cebedUL, 0x8bb0f5c9UL, 0xcef906f5UL, 0x69ba0331UL, 0x1f4f0b3dUL, 0x211b18d9UL, 0xfbceeac5UL, 0x116300c1UL, 0xf412678dUL, 0xc98c14e9UL, 0x97259395UL, 0x852abf51UL, 0x8e4350ddUL, 0xa7dff9f9UL, 0xc805d165UL, 0x49afcee1UL, 0xbe2b172dUL, 0x8fdbd809UL, 0x350d7435UL, 0x9ee1bf71UL, 0x70f00a7dUL, 0xab3dbf19UL, 0x023f4c05UL, 0x4f912101UL, 0x36e57acdUL, 0x17ccbf29UL, 0x33d328d5UL, 0x61ff8391UL, 0xf6dbb81dUL, 0x8e68e839UL, 0x4605daa5UL, 0x396f7721UL, 0x1e70126dUL, 0x231b4a49UL, 0xc9e93175UL, 0xb8b48bb1UL, 0x9f5cd9bdUL, 0x2e25f559UL, 0xd733fd45UL, 0xf5c35141UL, 0x09c95e0dUL, 0x6e13f969UL, 0x23120e15UL, 0x0e4157d1UL, 0x1399ef5dUL, 0x72c96679UL, 0x8bf433e5UL, 0xad152f61UL, 0xdcbfddadUL, 0x61934c89UL, 0xea603eb5UL, 0xd0f667f1UL, 0x408978fdUL, 0x2237bb99UL, 0xf6c0fe85UL, 0x63fd9181UL, 0x83f2114dUL }

Definition at line 91 of file random.c.

#define N   624

Definition at line 83 of file random.c.

#define TWIST ( u,
 )     ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? A : 0UL))

Definition at line 87 of file random.c.

Referenced by mt19937_next_state().

#define ZIGLEVELS   256

Definition at line 103 of file random.c.

#define ZIGR   3.6554204190269

Definition at line 105 of file random.c.

Referenced by it_randn().

#define ZIGRINV   0.2735663440503

Definition at line 107 of file random.c.

Referenced by it_randn().

#define ZIGV   0.0049287609634869

Definition at line 109 of file random.c.


Typedef Documentation

typedef unsigned int it_uint32_t

Definition at line 76 of file random.c.


Function Documentation

static void mt19937_next_state ( void   )  [static]

static double mt19937_rand (  )  [static]

Definition at line 571 of file random.c.

References mt19937_rand_real2().

Referenced by it_rand().


Variable Documentation

int idx = 0 [static]

Definition at line 98 of file random.c.

Referenced by mt19937_srand(), and Vec_sort_index().

int initf = 0 [static]

Definition at line 95 of file random.c.

Referenced by mt19937_next_state(), mt19937_srand(), and mt19937_srand_by_array().

const double zfn[ZIGLEVELS] [static]

Definition at line 178 of file random.c.

Referenced by it_randn().

const unsigned long int zkn[ZIGLEVELS] [static]

Definition at line 111 of file random.c.

Referenced by it_randn().

const double zwn[ZIGLEVELS] [static]

Definition at line 246 of file random.c.

Referenced by it_randn().


Hosted by
Copyright (C) 2005-2006 Hervé Jégou
Vivien Chappelier
Francois Cayre
libit logo courtesy of Jonathan Delhumeau