// operator>> on cl_MI.
// General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
// Specification.
#include "cln/modinteger.h"
// Implementation.
#include "cln/integer.h"
-#include "cl_N.h"
-#include "cl_MI.h"
+#include "cln/exception.h"
+#include "modinteger/cl_MI.h"
namespace cln {
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);
}
// 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));