Manual for mpz_powm, mpz_powm_ui
    Torbjörn Granlund 
    tg at gmplib.org
       
    Mon Jun 27 13:14:27 UTC 2016
    
    
  
abbott at dima.unige.it writes:
  What do mpz_powm and mpz_powm_ui return when the caller requests 0^0?
It is exponentiation in a ring, one should think of as quoting with the
last argument m, i.e., Z/mZ.  When m = 0 this is plain old Z.
Is that not what you observe?
  Are there restrictions on the value of the last arg (modulus)?
  [can modulus be 0, 1, negative?]
  
The sign of m does not affect the result.
-- 
Torbjörn
Please encrypt, key id 0xC8601622
    
    
More information about the gmp-discuss
mailing list