⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 random.c

📁 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY without ev
💻 C
📖 第 1 页 / 共 2 页
字号:
{  random8_state_t *state = (random8_state_t *) vstate;    if (s == 0)     s = 1;  state->x = s;}static voidrandom32_glibc2_set (void *vstate, unsigned long int s){  random32_state_t *state = (random32_state_t *) vstate;  int i;  glibc2_initialize (state->x, 7, s) ;  state->i = 3;  state->j = 0;    for (i = 0 ; i < 10 * 7 ; i++)    random32_get (state) ; }static voidrandom64_glibc2_set (void *vstate, unsigned long int s){  random64_state_t *state = (random64_state_t *) vstate;  int i;  glibc2_initialize (state->x, 15, s) ;  state->i = 1;  state->j = 0;    for (i = 0 ; i < 10 * 15 ; i++)    random64_get (state) ; }static voidrandom128_glibc2_set (void *vstate, unsigned long int s){  random128_state_t *state = (random128_state_t *) vstate;  int i;  glibc2_initialize (state->x, 31, s) ;  state->i = 3;  state->j = 0;    for (i = 0 ; i < 10 * 31 ; i++)    random128_get (state) ; }static voidrandom256_glibc2_set (void *vstate, unsigned long int s){  random256_state_t *state = (random256_state_t *) vstate;  int i;  glibc2_initialize (state->x, 63, s) ;  state->i = 1;  state->j = 0;    for (i = 0 ; i < 10 * 63 ; i++)    random256_get (state) ; }static voidrandom8_libc5_set (void *vstate, unsigned long int s){  random8_state_t *state = (random8_state_t *) vstate;    if (s == 0)     s = 1;  state->x = s;}static voidrandom32_libc5_set (void *vstate, unsigned long int s){  random32_state_t *state = (random32_state_t *) vstate;  int i;  libc5_initialize (state->x, 7, s) ;  state->i = 3;  state->j = 0;    for (i = 0 ; i < 10 * 7 ; i++)    random32_get (state) ; }static voidrandom64_libc5_set (void *vstate, unsigned long int s){  random64_state_t *state = (random64_state_t *) vstate;  int i;  libc5_initialize (state->x, 15, s) ;  state->i = 1;  state->j = 0;    for (i = 0 ; i < 10 * 15 ; i++)    random64_get (state) ; }static voidrandom128_libc5_set (void *vstate, unsigned long int s){  random128_state_t *state = (random128_state_t *) vstate;  int i;  libc5_initialize (state->x, 31, s) ;  state->i = 3;  state->j = 0;    for (i = 0 ; i < 10 * 31 ; i++)    random128_get (state) ; }static voidrandom256_libc5_set (void *vstate, unsigned long int s){  random256_state_t *state = (random256_state_t *) vstate;  int i;  libc5_initialize (state->x, 63, s) ;  state->i = 1;  state->j = 0;    for (i = 0 ; i < 10 * 63 ; i++)    random256_get (state) ; }static const gsl_rng_type random_glibc2_type ={"random-glibc2",                       /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random128_state_t), &random128_glibc2_set, &random128_get, &random128_get_double};static const gsl_rng_type random8_glibc2_type ={"random8-glibc2",                      /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random8_state_t), &random8_glibc2_set, &random8_get, &random8_get_double};static const gsl_rng_type random32_glibc2_type ={"random32-glibc2",                     /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random32_state_t), &random32_glibc2_set, &random32_get, &random32_get_double};static const gsl_rng_type random64_glibc2_type ={"random64-glibc2",                     /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random64_state_t), &random64_glibc2_set, &random64_get, &random64_get_double};static const gsl_rng_type random128_glibc2_type ={"random128-glibc2",                    /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random128_state_t), &random128_glibc2_set, &random128_get, &random128_get_double};static const gsl_rng_type random256_glibc2_type ={"random256-glibc2",                    /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random256_state_t), &random256_glibc2_set, &random256_get, &random256_get_double};static const gsl_rng_type random_libc5_type ={"random-libc5",                        /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random128_state_t), &random128_libc5_set, &random128_get, &random128_get_double};static const gsl_rng_type random8_libc5_type ={"random8-libc5",                       /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random8_state_t), &random8_libc5_set, &random8_get, &random8_get_double};static const gsl_rng_type random32_libc5_type ={"random32-libc5",                      /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random32_state_t), &random32_libc5_set, &random32_get, &random32_get_double};static const gsl_rng_type random64_libc5_type ={"random64-libc5",                      /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random64_state_t), &random64_libc5_set, &random64_get, &random64_get_double};static const gsl_rng_type random128_libc5_type ={"random128-libc5",                     /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random128_state_t), &random128_libc5_set, &random128_get, &random128_get_double};static const gsl_rng_type random256_libc5_type ={"random256-libc5",                     /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random256_state_t), &random256_libc5_set, &random256_get, &random256_get_double};static const gsl_rng_type random_bsd_type ={"random-bsd",                  /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random128_state_t), &random128_bsd_set, &random128_get, &random128_get_double};static const gsl_rng_type random8_bsd_type ={"random8-bsd",                 /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random8_state_t), &random8_bsd_set, &random8_get, &random8_get_double};static const gsl_rng_type random32_bsd_type ={"random32-bsd",                        /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random32_state_t), &random32_bsd_set, &random32_get, &random32_get_double};static const gsl_rng_type random64_bsd_type ={"random64-bsd",                        /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random64_state_t), &random64_bsd_set, &random64_get, &random64_get_double};static const gsl_rng_type random128_bsd_type ={"random128-bsd",               /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random128_state_t), &random128_bsd_set, &random128_get, &random128_get_double};static const gsl_rng_type random256_bsd_type ={"random256-bsd",               /* name */ 0x7fffffffUL,                  /* RAND_MAX */ 0,                             /* RAND_MIN */ sizeof (random256_state_t), &random256_bsd_set, &random256_get, &random256_get_double};const gsl_rng_type *gsl_rng_random_libc5    = &random_libc5_type;const gsl_rng_type *gsl_rng_random8_libc5   = &random8_libc5_type;const gsl_rng_type *gsl_rng_random32_libc5  = &random32_libc5_type;const gsl_rng_type *gsl_rng_random64_libc5  = &random64_libc5_type;const gsl_rng_type *gsl_rng_random128_libc5 = &random128_libc5_type;const gsl_rng_type *gsl_rng_random256_libc5 = &random256_libc5_type;const gsl_rng_type *gsl_rng_random_glibc2    = &random_glibc2_type;const gsl_rng_type *gsl_rng_random8_glibc2   = &random8_glibc2_type;const gsl_rng_type *gsl_rng_random32_glibc2  = &random32_glibc2_type;const gsl_rng_type *gsl_rng_random64_glibc2  = &random64_glibc2_type;const gsl_rng_type *gsl_rng_random128_glibc2 = &random128_glibc2_type;const gsl_rng_type *gsl_rng_random256_glibc2 = &random256_glibc2_type;const gsl_rng_type *gsl_rng_random_bsd    = &random_bsd_type;const gsl_rng_type *gsl_rng_random8_bsd   = &random8_bsd_type;const gsl_rng_type *gsl_rng_random32_bsd  = &random32_bsd_type;const gsl_rng_type *gsl_rng_random64_bsd  = &random64_bsd_type;const gsl_rng_type *gsl_rng_random128_bsd = &random128_bsd_type;const gsl_rng_type *gsl_rng_random256_bsd = &random256_bsd_type;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -