Power x^y both mpz_t

Torbjorn Granlund tg at gmplib.org
Sun Jun 20 20:08:46 CEST 2010


"Edoardo" <gygabyte017 at hotmail.com> writes:

  Hi, I have to compute x^y where x and y are both mpz_t variables; reading the manual, I've found only the pow modulo n, or the pow between two UI or an UI and a mpz_t. Why? How can I do?
  
If the expoent is greater than what can be stored in an 'unsigned long
int', then the result will not fit in memory of your computer (except
perhaps for -1^x, 0^x, and 1^x).  So no, there is no such function in
GMP.

-- 
Torbjörn


More information about the gmp-discuss mailing list