Macaulay2 Engine
Loading...
Searching...
No Matches

◆ rawSetRandomSeed()

void rawSetRandomSeed ( gmp_ZZ newseed)

Definition at line 28 of file random.cpp.

29{
30 gmp_randseed(state, newseed);
31
32 int32_t s = mpz_get_si(newseed);
33 s = s & 0x7fffffff;
34 if (s == MASK) s = 0;
35 RandomSeed = s ^ MASK;
36}
void size_t s
Definition m2-mem.cpp:271
static int32_t RandomSeed
Definition random.cpp:19
static gmp_randstate_t state
Definition random.cpp:18
#define MASK
Definition random.cpp:15

References MASK, RandomSeed, s, and state.