]> www.ginac.de Git - cln.git/blobdiff - src/numtheory/cl_nt_jacobi_low.cc
Cater to the fact that g++ 4.3 will use a different naming for
[cln.git] / src / numtheory / cl_nt_jacobi_low.cc
index 6a55823c5d9a90cbdaf5adbedec9b1c4a23b0bce..7b706a229a2e9aaa142c0b546cc1443e528a74b4 100644 (file)
@@ -9,7 +9,7 @@
 
 // Implementation.
 
-#include "cln/abort.h"
+#include "cln/exception.h"
 #include "cl_xmacros.h"
 
 namespace cln {
@@ -33,7 +33,7 @@ inline int jacobi_aux (uintV a, uintV b)
                        switch (b % 4) {
                                case 1: break;
                                case 3: v = -v; break;
-                               default: cl_abort();
+                               default: throw runtime_exception();
                        }
                        continue;
                }
@@ -44,7 +44,7 @@ inline int jacobi_aux (uintV a, uintV b)
                        switch (b % 8) {
                                case 1: case 7: break;
                                case 3: case 5: v = -v; break;
-                               default: cl_abort();
+                               default: throw runtime_exception();
                        }
                        continue;
                }
@@ -65,9 +65,9 @@ int jacobi (sintV a, sintV b)
 {
        // Check b > 0, b odd.
        if (!(b > 0))
-               cl_abort();
+               throw runtime_exception();
        if ((b & 1) == 0)
-               cl_abort();
+               throw runtime_exception();
        // Ensure 0 <= a < b.
        if (a >= 0)
                a = (uintV)a % (uintV)b;