---------- Forwarded message ---------- From: Jason Moxham <ja...@njkfrudils.plus.com> Date: 2009/8/17 Subject: [mpir-devel] mpz_nextprime To: mpir-de...@googlegroups.com
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 --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---