#include <faast.hpp>
#include <cstdlib>
using namespace std;
using namespace FAAST;
int main(int argv, char* argc[]) {
double cputime;
int retval = 0;
gfp::Infrastructure::BigInt p;
long d, l;
if (cin.peek() != EOF) {
cin >> p; cin >> d; cin >> l;
} else {
p = 3; d = 2; l = 3;
}
cout << "Using " << gfp::Infrastructure::name << endl << endl;
cputime = -NTL::GetTime();
cputime += NTL::GetTime();
cout << *K << " in " << cputime << endl;
#ifdef FAAST_TIMINGS
cout << "Time spent building the irreducible polynomial : "
<< gfp::TIME.BUILDIRRED << endl;
#endif
cout << endl;
cout << "\tCreate\tMinPol\tInterp\tEval" << endl;
for (int i = 1 ; i <= l ; i++) {
cout << i << "\t";
cputime = -NTL::GetTime();
cputime += NTL::GetTime();
cout << cputime << "\t";
vector<gfp_X> minpols;
cputime = -NTL::GetTime();
cputime += NTL::GetTime();
cout << cputime << "\t";
bool nopol = false;
cputime = -NTL::GetTime();
try {
nopol = true;
cout << "*";
}
cputime += NTL::GetTime();
cout << cputime << "\t";
if (!nopol) {
cputime = -NTL::GetTime();
cputime += NTL::GetTime();
cout << cputime << endl;
if (c != b) {
cout << "ERROR 1 : Results don't match" << endl;
cout << a << endl << b << endl << c << endl;
cout << poly << endl;
retval = 1;
}
poly >>= *K;
if (c != b) {
cout << "ERROR 2 : Results don't match" << endl;
cout << a << endl << b << endl << c << endl;
cout << poly << endl;
retval = 1;
}
} else cout << "*\t" << endl;
}
return retval;
}