#include <cln/integer_io.h>
#include <cln/float.h>
#include <cln/real.h>
-#include <stdlib.h>
-#include <string.h>
+#include <cstdlib>
+#include <cstring>
#include <cln/timing.h>
using namespace std;
if (argc < 1)
exit(1);
- stderr << "Number of digits: " << digits << endl;
- stderr << "Number of repetitions: " << repetitions << endl;
+ cerr << "Number of digits: " << digits << endl;
+ cerr << "Number of repetitions: " << repetitions << endl;
float_format_t prec = float_format(digits);
float_format_t prec2 = float_format(digits*2);
cl_I x2 = floor1(sqrt(cl_float(3,prec)) * pow);
cl_I x3 = pow+1;
- stderr << "multiplication" << endl;
+ cerr << "multiplication" << endl;
{ cl_I r = x1*x2;
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- stderr << "division" << endl;
+ cerr << "division" << endl;
{ cl_I_div_t qr = floor2(x1,x2);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << qr.quotient << endl << qr.remainder << endl << endl;
}
- stderr << "isqrt" << endl;
+ cerr << "isqrt" << endl;
{ cl_I r = isqrt(x3);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)
cout << r << endl << endl;
}
- stderr << "gcd" << endl;
+ cerr << "gcd" << endl;
{ cl_I r = gcd(x1,x2);
{ CL_TIMING;
for (int rep = repetitions; rep > 0; rep--)