Exporting a gmp_rndstate_t?

Christopher Creutzig ccr at sciface.com
Wed Jun 6 11:05:18 CEST 2007


 is it possible to (portably) export and re-import a gmp_rndstate_t, as
an mpz_t can be via mpz_export and mpz_import (plus storing the sign)?
(If this limitation is necessary, an answer only valid for the MT
algorithm would probably be fine.)

 On a slightly related note, I'd be happy to find a way of converting a
gmp_rndstate_t to an (opaque) mpz_t which can be converted back to a
gmp_rndstate_t without the runtime overhead required for the current
initialization from an unsigned int. Here, I don't really bother whether
the random state remains the same, I just need a deterministic outcome.
Does something like this exist?

SciFace Software GmbH & Co. KG
    Technologiepark 11    Tel: ++49 (0)5251 640751
    D-33100 Paderborn     Fax: ++49 (0)5251 640799
    Deutschland           Web: www.sciface.com
Sitz der Gesellschaft: Paderborn
    Registergericht Paderborn HRA 2080
    Ust.-ID Nr.: DE 187992139
Persönlich haftende Gesellschaft:
    SciFace Software Verwaltungsgesellschaft mbH
    Registergericht Paderborn HRB 2924
    Geschäftsführer: Dr. Oliver Kluge

More information about the gmp-devel mailing list