# mpz_invert function

**Diego Sanchez Navarro
**
diegosancheznavarro@hotmail.com

*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.
Regards,
Diego Sanchez Navarro
-----Mensaje original-----
De: Kevin Ryde [mailto:user42@zip.com.au]
Enviado el: Monday, November 11, 2002 5:15 PM
Para: gmp-discuss@swox.com
CC: Diego Sanchez Navarro
Asunto: Re: mpz_invert function
"Diego Sanchez Navarro" <diegosancheznavarro@hotmail.com> 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
manual.