+ //number<> B = 0xffffffffU;
+ number<> A(bufA, 4, positive);
+ number<> B(bufB, 4, positive);
+
+
+ std::cout << "nu = " << A << "\n\n";
+ std::cout << "nu2 = " << B << "\n\n";
+ std::cout << "nu + nu2 = " << A + B << "\n\n";
+
+ number<> N = naif(A, B);
+ std::cout << "nu `naif` nu2 = " << N << "\n\n";
+
+ number<> K = karatsuba(A, B);
+ std::cout << "nu `ko` nu2 = " << K << "\n\n";
+
+ assert(N == K);
+
+ number<> N2 = naif(A, A);
+ std::cout << "nu `naif` nu = " << N2 << "\n\n";
+
+ number<> K2 = karatsuba(A, A);
+ std::cout << "nu `ko` nu = " << K2 << "\n\n";
+
+ assert(N2 == K2);
+
+ //std::cout << "nu^nu2 = " << pot_dyc_n(A, B) << "\n\n";
+
+ number<> X = 0xff;
+ number<> Y = 0xff;
+ std::cout << "r = " << naif(X, Y) << "\n\n";
+
+#if 1
+ number <>rd = pot_dyc_n(X, Y);
+ std::cout << "x `pot_dyc_n` y = " << rd << "\n\n";
+ number <>rc = pot_dyc_k(X, Y);
+ std::cout << "x `pot_dyc_k` y = " << rc << "\n\n";
+ if (!(rc == rd)) {
+ printf("Las pot NO DAN\n");
+ } else {
+ printf("Las pot dan iguales\n");
+ }