X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;ds=sidebyside;f=src%2Fnumtheory%2Fcl_nt_jacobi_low.cc;h=7b706a229a2e9aaa142c0b546cc1443e528a74b4;hb=8b3d91dec77438c0fe679b10869ab29e6cdeba58;hp=6a55823c5d9a90cbdaf5adbedec9b1c4a23b0bce;hpb=6fdd87f5e762926b273583db2d6440862584596f;p=cln.git diff --git a/src/numtheory/cl_nt_jacobi_low.cc b/src/numtheory/cl_nt_jacobi_low.cc index 6a55823..7b706a2 100644 --- a/src/numtheory/cl_nt_jacobi_low.cc +++ b/src/numtheory/cl_nt_jacobi_low.cc @@ -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;