Torbjorn Granlund <t...@gmplib.org> writes: > ni...@lysator.liu.se (Niels Möller) writes: > > I see. In this particular case, I think the right gmp interface change > is to add mpn_urandomb and mpn_rrandomb (similar to current mpn_random > and mpn_random2, but with a randstate argument). If I understand this > correctly, the main obstacle is that random number internals use mpz > functions, which is an undesirable dependency for mpn functions. > > We should indeed do this.
After 5.2? > For testing the result, I'd write a wrapper C program that run old and > new code in separate processes, and compare that the results are > identical for the same (now and then regenerated) seeds. If the generation is intended to be machine-independent, it would also make sense to also add tests generating some random numbers from a few fixed seeds, and compare to expected (constant) numbers. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel