2 #include "../src/number.h"
7 unsigned long buf[5] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0 };
8 //unsigned buf[3] = { 0xffffffff, 0x1, 0 };
10 //number< unsigned > nu2(nu);
12 std::cout << "nu = " << nu << "\n\n";
13 std::cout << "nu2 = " << nu2 << "\n\n";
14 std::cout << "nu + nu2 = " << nu + nu2 << "\n\n";
15 std::cout << "nu * nu2 = " << nu * nu2 << "\n\n";
16 std::cout << "nu^nu2 = " << potencia(nu, nu2) << "\n\n";
20 number< unsigned > nu = 0xffffffff;
21 std::cout << "nu = " << nu ;
24 std::cout << "nu = " << nu ;
26 number<> n1 = 0xFFFFFFFF;
27 number<> n2 = 0xFFFFFFFF;
31 /* for (int k = 0; k < 100; k++)
33 n1 += (unsigned) rand() * k;
34 n2 += (unsigned) rand() * k;
42 std::cout << "n1 es menor que n2\n";
44 std::cout << "n1 es mayor que n2\n";
46 std::cout << "n1 es igual que n2\n";
51 // for (int j=0; j<10; j++)
54 std::cout << "n1: " << n1 ;
56 std::cout << "n2: " << n2 ;
61 std::cout << "n1-n2: " << n1 ;
65 uint32_t buf[] = { 0x00000040, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 };
66 number<> nu(buf, 8, negative);
68 std::cout << "nu = " << nu ;
70 std::cout << "nu2 = " << nu2 ;
72 std::cout << "nu * nu2 = " << naif(nu, nu2) ;
74 std::cout << "nu + nu2 = " << nu + nu2 ;
76 std::cout << "nu - nu2 = " << nu - nu2 ;
80 number<> h = 0x10000000;
88 number<> m = 0xfffffffe;
94 std::cout << "h: " << h ;
96 std::cout << "d: " << d ;
98 std::cout << "m: " << m ;
101 number<> a = h - d - m;
103 std::cout << "h-d-m: " << a ;