I've obsoleted the function

void mpz_nextprime(mpz_t ROP ,mpz_t OP)

so any code using this function should be converted to use the new function if 
you want to remain compatible with further MPIR releases. We will maintain 
the old function interface for some time to come to maintain compatibility.

The new function is this

void mpz_next_probable_prime(mpz_t ROP ,mpz_t OP ,gmp_randstate_t STATE)

as you can see we have changed the name to reflect more accurately what the 
function does and we now require a random state variable.

So the old mpz_nextprime function can be replaced like this

mpz_nextprime(ROP,OP)

is equivalent to 

{
gmp_randstate_t STATE;
gmp_randinit_default(STATE);
mpz_next_probable_prime(ROP,OP,STATE);
gmp_randclear(STATE);
}


This equivalence highlights the other deficiency of the old function , in that 
it would always use the same initial random state. To use the new function in 
a more robust mathematical manner , the random state should be global.

Jason



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to