reproducibility of GMP random functions vs limb size and GMP version

Pedro Gimeno gmpdevel at formauri.es
Wed Sep 15 21:26:39 CEST 2010


Paul Zimmermann wrote:

> The MPFR random functions use the GMP random seed. However to ensure the user
> he/she will get the same results (for a given seed) whatever the limb size
> and/or the GMP version, we assume that the GMP random functions do not depend
> on the limb size nor the GMP version. This seems to hold, but it is not
> documented.

Is there such guarantee for a change in GMP version at all?

I remember a discussion with Torbjörn (previous to May 2003), while the
new MT generator was being prepared, where he stated precisely that such
a guarantee didn't exist. I'm afraid I've lost these emails, though.

Since 2005, I had the intention of changing the seeding function to a
much faster one (in the order of 100x faster), but that change would
make the numbers obtained with a seed to be different to those obtained
with the same seed in the current version.

However, Torbjörn wasn't happy of that change to the seeding function,
presumably because he preferred to keep consistency of the generated
numbers across versions.

I wonder, however, if it would be enough for you to have PRNG state
export/import functions in order to overcome a potential problem of that
nature.

-- Pedro Gimeno


More information about the gmp-devel mailing list