Inner step of multiplication in x64 assembly
[ipdf/code.git] / src / tests / arb.cpp
index 29c6325..354c337 100644 (file)
@@ -2,13 +2,24 @@
 #include <cstdio>
 #include <iostream>
 
-#include "arbint.cpp"
+#include "arbint.h"
 
 using namespace std;
 using namespace IPDF;
 
 int main(int argc, char ** argv)
 {
-       Arbint a(4294967296L);
-       printf("%s\n", a.Str().c_str());
+       int64_t test[] = {12L, 5L};
+       test[1] = 0xE000000000000000;
+       int64_t size = sizeof(test)/sizeof(int64_t);
+       
+       int64_t mul = 2L;
+       
+       int64_t overflow = mul_digits(test, mul, size);
+       
+       for (int64_t i = 0; i < size; ++i)
+       {
+               printf("digit[%li] = %.16lx\n", i, test[i]);
+       }
+       printf("Overflow is %.16lx\n", overflow);
 }

UCC git Repository :: git.ucc.asn.au