32#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && \
33 !defined(__STDC_NO_ATOMICS__)
36#define LRAND48_ATOMIC 1
38#define LRAND48_ATOMIC 0
44#ifdef HAVE_GETTIMEOFDAY
66#define LCG_A UINT64_C(0x5DEECE66D)
67#define LCG_B UINT64_C(0xB)
68#define MASK48 UINT64_C(0xFFFFFFFFFFFF)
73static const uint32 a0 = 0xE66D;
74static const uint32 a1 = 0xDEEC;
75static const uint32 a2 = 0x5;
77static const uint32 b0 = 0xB;
83#define LO(x) ((x) & 0xFFFFU)
84#define HI(x) ((x) >> 16)
134#ifdef HAVE_GETTIMEOFDAY
179static void G__next(
void)
215 return (
long)(G__next() >> 17);
260 return (
double)G__next() / 281474976710656.0;
270 r /= 281474976710656.0;
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
long G_mrand48(void)
Generate an integer in the range [-2^31, 2^31)
long G_lrand48(void)
Generate an integer in the range [0, 2^31)
long G_srand48_auto(void)
Seed the pseudo-random number generator from the time and PID.
void G_srand48(long seedval)
Seed the pseudo-random number generator.
double G_drand48(void)
Generate a floating-point value in the range [0,1)
int gettimeofday(struct timeval *, struct timezone *)