Re: GMP Problem with % under C++

2020-11-06 Thread Torbjörn Granlund
Miki Hermann writes: I am very well familiar with the % operator in %. Swell. In the document, whose link you sent me, and which I have read before, it is mentioned that Function: mpz_class operator% (mpz_class a, mpz_class d) This means, that the % operator in GMP overloads the

Re: GMP Problem with % under C++

2020-11-06 Thread Miki Hermann
I am very well familiar with the % operator in %. In the document, whose link you sent me, and which I have read before, it is mentioned that Function: mpz_class operator% (mpz_class a, mpz_class d) This means, that the % operator in GMP overloads the usual % operator in C++. Just to recall

Re: GMP Problem with % under C++

2020-11-06 Thread sisyphus
On Fri, Nov 6, 2020 at 8:27 AM Niels Möller wrote: > [snip] > > So your problem really is with % in C++, GMP just follows the > conventions for the builtin integers. > Rather, the OP is expecting that the ''%" operator in his C++ program will behave as mpz_mod() does - which is the same way as