mpz_invert function

Diego Sanchez Navarro
Mon, 11 Nov 2002 22:30:03 -0500

Thank you very much for your quick response. I found a description of
the inner workings of the mpz_gcdext function, but not of the mpz_invert
function. I derive from your answer that using either function would be
essentially the same, then. Though my tests using the same sample data
show a slightly better performance by the mpz_invert function, this must
probably be due to abnormalities in my testing process.
	Diego Sanchez Navarro

-----Mensaje original-----
De: Kevin Ryde [] 
Enviado el: Monday, November 11, 2002 5:15 PM
CC: Diego Sanchez Navarro
Asunto: Re: mpz_invert function

"Diego Sanchez Navarro" <> writes:
> I am writing a paper investigating different alternatives of
> calculating inverses of large numbers modulo a similarly large
> number (several thousand bits long). I did not find details on the
> GMP manual about the workings of the mpz_invert function. What
> algorithm does it use? Is using it the same as using the mpz_gcdext
> algorithm to calculate the inverse,

Yes, there's some notes on that in the algorithms chapter of the