]> www.ginac.de Git - cln.git/blob - src/integer/division/cl_I_exquopos.cc
Initial revision
[cln.git] / src / integer / division / cl_I_exquopos.cc
1 // exquopos().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cl_integer.h"
8
9
10 // Implementation.
11
12 #include "cl_I.h"
13
14 const cl_I exquopos (const cl_I& x, const cl_I& y)
15 {
16 // Methode:
17 // (exquopos x y) :==
18 // (DIVIDE x y) -> q,r
19 // Falls r<>0, Error.
20 // Liefere q.
21   var cl_I_div_t q_r = cl_divide(x,y);
22   if (!zerop(q_r.remainder)) { cl_error_exquo(x,y); }
23   return q_r.quotient;
24 }