[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Change seed for every iteration
From: |
J Naman |
Subject: |
RE: Change seed for every iteration |
Date: |
Fri, 3 Nov 2023 13:56:14 -0400 |
I should have noted the following:
GNU gmp_randinit_mt() uses the Mersenne Twister algorithm that has good
randomness properties.
For any pseudo-random algorithm, I believe that the “quality” of the seed
is the randomness of a given seed compared to the previous seed used, and
this affects the randomness of separate number sequences. Seeding with time
values in a loop would seem to generate seeds that are linear compared to
the previous seed used. That reseeding almost guarantees NON-random
results. Consider reseeding every 2^20th to 2^30th loops ...
ref: https://gmplib.org/manual/Random-State-Seeding