Random number generator in mpz_millerrabin

Gary Wong gtw@gnu.org
Fri, 13 Dec 2002 10:34:43 -0500

On Fri, Dec 13, 2002 at 01:18:40AM +0100, pggimeno@wanadoo.es wrote:
> There's another possibility. As mpz_millerrabin is not calling
> gmp_randseed, the MT initialization function could initialize its
> state with a predefined buffer instead of calling the seeding
> function internally. In this way the new gmp_randinit_mt_buff
> function is avoided and mpz_millerrabin can keep using
> gmp_randinit_default which is even better.

I think this is an excellent idea.  It optimises for the common case,
and has no side effects.  It certainly ought to get mpz_millerrabin()
up to a reasonable speed, and is likely to help in other situations as

   Gary Wong           gtw@gnu.org           http://www.cs.arizona.edu/~gary/