this is my test file "main.cc"
#include <iostream>
using namespace std;
#include <gmpxx.h>
int main (void)
{
mpz_class x, p, q, eq, ep;
x=2;
p=0;
q=0;
ep=19;
eq=27;
cout << "X=" <<x <<"\n";
cout << "P=" << p << "\n";
cout << "Q=" << q << "\n";
cout << "EP=" << ep << "\n";
cout << "EQ=" << eq << "\n";
p=x^ep;
q=x^eq;
cout << "----\n";
cout << "P=" << p << "\n";
cout << "Q=" << q << "\n";
return 0;
}
it produces :
# g++ main.cc -lgmpxx -lgmp -Wall
# ./a.out
X=2
P=0
Q=0
EP=19
EQ=27
----
P=17
Q=25
#
why P=17 and Q=25 ???
should be P=524288 and Q=2097152
(operations + - * / % works well is there a problem with ^ )
_______________________________________________
Bug-gmp mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gmp