]> www.ginac.de Git - cln.git/blobdiff - tests/test_I_ilength.cc
* src/base/digitseq/cl_asm_i386_.cc (compare_loop_up,
[cln.git] / tests / test_I_ilength.cc
index 0332c55c0ee1a2f200dc800dc12bac4bde99f7ef..600b4b56c8e0b1a3d18dc808475de8cb0433a781 100644 (file)
@@ -7,11 +7,8 @@ int test_I_integer_length (int iterations)
        // Check against ash.
        for (i = iterations; i > 0; i--) {
                cl_I a = testrandom_I();
-               uintL l = integer_length(a);
+               uintC l = integer_length(a);
                if (a >= 0) {
-#if !(defined(__GNUC__) && (__GNUC_MINOR__ < 8))
-                       ASSERT1(a < ash(1,l) && (a == 0 ? l == 0 : l > 0 && a >= ash(1,l-1)), a);
-#else // work around g++ 2.7.0 bug
                        int b = 0;
                        if (a < ash(1,l)) {
                                if (a == 0)
@@ -20,11 +17,7 @@ int test_I_integer_length (int iterations)
                                        b = (l > 0 && a >= ash(1,l-1));
                        }
                        ASSERT1(b, a);
-#endif
                } else {
-#if !(defined(__GNUC__) && (__GNUC_MINOR__ < 8))
-                       ASSERT1(a >= ash(-1,l) && (a == -1 ? l == 0 : l > 0 && a < ash(-1,l-1)), a);
-#else // work around g++ 2.7.0 bug
                        int b = 0;
                        if (a >= ash(-1,l)) {
                                if (a == -1)
@@ -33,7 +26,6 @@ int test_I_integer_length (int iterations)
                                        b = (l > 0 && a < ash(-1,l-1));
                        }
                        ASSERT1(b, a);
-#endif
                }
        }
        return error;