X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Fmodinteger%2Fcl_MI_rshift.cc;h=a4fec8b1aef601ad36143cf327ab4be30aff8250;hb=3af2cde18b3aabed4c808b0113daa81c2263b0bd;hp=957d170836e0f51a75b655bf93866512814c842e;hpb=c84c6db5d56829d69083c819688a973867694a2a;p=cln.git diff --git a/src/modinteger/cl_MI_rshift.cc b/src/modinteger/cl_MI_rshift.cc index 957d170..a4fec8b 100644 --- a/src/modinteger/cl_MI_rshift.cc +++ b/src/modinteger/cl_MI_rshift.cc @@ -1,7 +1,7 @@ // operator>> on cl_MI. // General includes. -#include "cl_sysdep.h" +#include "base/cl_sysdep.h" // Specification. #include "cln/modinteger.h" @@ -10,8 +10,8 @@ // Implementation. #include "cln/integer.h" -#include "cl_N.h" -#include "cl_MI.h" +#include "cln/exception.h" +#include "modinteger/cl_MI.h" namespace cln { @@ -22,7 +22,7 @@ const cl_MI operator>> (const cl_MI& x, sintC y) // assume 0 <= y < 2^(intCsize- var const cl_modint_ring& R = x.ring(); if (!oddp(R->modulus)) { if (R->modulus == 2) - cl_error_division_by_0(); + throw division_by_0_exception(); else return (cl_MI_x)cl_notify_composite(R,2); } @@ -37,7 +37,7 @@ const cl_MI operator>> (const cl_MI& x, sintC y) // assume 0 <= y < 2^(intCsize- // Use algorithm 1 for small y, algorithm 2 for large y. #if 0 if (y <= 2*R->bits) - cl_abort(); // not yet implemented + throw runtime_exception(); // not yet implemented else #endif return R->div(x, expt_pos(R->canonhom(2), (cl_I)(long)y));