bug report

Niels Möller nisse at lysator.liu.se
Tue Aug 23 12:11:44 UTC 2016


Thomas Lover <mailbidonjustice at gmail.com> writes:

> Seems the mpz_powm is not recognized…
>
> mills.cpp:29:5: error: no matching function for call to '__gmpz_powm'
>     mpz_powm(a.get_mpz_t(),trois.get_mpz_t(),o.get_mpz_t());
>     ^~~~~~~~

I assume mills.cpp is your code? You pass three arguments to the mpz_powm function.

> /usr/local/include/gmp.h:982:21: note: candidate function not viable: requires 4 arguments,
>       but 3 were provided
> __GMP_DECLSPEC void mpz_powm (mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr);
>                     ^

And the friendly compiler tells you that 4 arguments are required, which
also agrees with the GMP manual,
https://gmplib.org/manual/Integer-Exponentiation.html. What makes you
think this is a bug in the gmp library?

Questions on how to use gmp are best directed to gmp-discuss at gmplib.org.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-bugs mailing list