7 #include "cln/integer.h"
16 const cl_I exquo (const cl_I& x, const cl_I& y)
20 // (DIVIDE (abs x) (abs y)) -> q,r
22 // Falls x,y verschiedene Vorzeichen haben, liefere -q, sonst q.
23 var cl_I_div_t q_r = cl_divide(abs(x),abs(y));
24 if (!zerop(q_r.remainder)) { cl_error_exquo(x,y); }
25 if (minusp(x) == minusp(y))
26 { return q_r.quotient; }
28 { return -q_r.quotient; }