]> www.ginac.de Git - cln.git/blobdiff - src/numtheory/cl_nt_sqrtmodp.cc
Fix bug in converting cl_LF to float, double.
[cln.git] / src / numtheory / cl_nt_sqrtmodp.cc
index 3b95574e2bd5dc14cdb6a0aa1098f52b58aba363..7b53740cc4b163f2e34f1041bfa7ca2cf3fc1346 100644 (file)
@@ -1,7 +1,7 @@
 // sqrt_mod_p().
 
 // General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
 
 // Specification.
 #include "cln/numtheory.h"
@@ -9,8 +9,8 @@
 
 // Implementation.
 
-#include "cl_I.h"
-#include "cln/abort.h"
+#include "integer/cl_I.h"
+#include "cln/exception.h"
 
 #undef floor
 #include <cmath>
@@ -287,7 +287,7 @@ static const sqrt_mod_p_t tonelli_shanks_sqrt (const cl_modint_ring& R, const cl
 
 const sqrt_mod_p_t sqrt_mod_p (const cl_modint_ring& R, const cl_MI& a)
 {
-       if (!(a.ring() == R)) cl_abort();
+       if (!(a.ring() == R)) throw runtime_exception();
        var cl_I& p = R->modulus;
        var cl_I aa = R->retract(a);
        switch (jacobi(aa,p)) {