git.ucc.asn.au
/
ipdf
/
code.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Script should still work after loadsvg is used
[ipdf/code.git]
/
src
/
tests
/
arbint_vs_gmpint.cpp
diff --git
a/src/tests/arbint_vs_gmpint.cpp
b/src/tests/arbint_vs_gmpint.cpp
index
2393d3a
..
a30758c
100644
(file)
--- a/
src/tests/arbint_vs_gmpint.cpp
+++ b/
src/tests/arbint_vs_gmpint.cpp
@@
-7,13
+7,14
@@
#include "gmpint.h"
#include "arbint.h"
#include "gmpint.h"
#include "arbint.h"
-#define TEST_CASES 100
+
using namespace IPDF;
int main(int argc, char ** argv)
{
using namespace IPDF;
int main(int argc, char ** argv)
{
- for (unsigned i = 0; i < TEST_CASES; ++i)
+ unsigned test_cases = (argc > 1) ? atoi(argv[1]) : 100;
+ for (unsigned i = 0; i < test_cases; ++i)
{
uint64_t a = rand();
{
uint64_t a = rand();
@@
-26,12
+27,27
@@
int main(int argc, char ** argv)
{
arb_a *= b;
gmp_a *= b;
{
arb_a *= b;
gmp_a *= b;
-
- Debug("Arbint - %s", arb_a.Str().c_str());
- Debug("Gmpint - %s", gmp_a.Str().c_str());
}
}
+ for (unsigned j = 0; j < 5; ++j)
+ {
+ arb_a += b;
+ gmp_a += b;
+ }
+
+ for (unsigned j = 0; j < 5; ++j)
+ {
+ arb_a /= b;
+ gmp_a /= b;
+ }
+
+
+ for (unsigned j = 0; j < 5; ++j)
+ {
+ arb_a -= b;
+ gmp_a -= b;
+ }
}
return 0;
}
}
return 0;
}
UCC
git Repository :: git.ucc.asn.au