]> www.ginac.de Git - cln.git/blobdiff - src/rational/elem/cl_RA_from_I_I_div.cc
Avoid some "suggest explicit braces to avoid ambiguous ‘else’" warnings.
[cln.git] / src / rational / elem / cl_RA_from_I_I_div.cc
index f6c51cbdba844052733f58da6d695d0ec992e8f8..6378a8157b3d5418537d1615cdccd2b92a79093b 100644 (file)
@@ -1,16 +1,18 @@
 // I_I_div_RA().
 
 // General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
 
 // Specification.
-#include "cl_RA.h"
+#include "rational/cl_RA.h"
 
 
 // Implementation.
 
-#include "cl_I.h"
-#include "cl_N.h"
+#include "cln/exception.h"
+#include "integer/cl_I.h"
+
+namespace cln {
 
 const cl_RA I_I_div_RA (const cl_I& a, const cl_I& b)
 {
@@ -19,9 +21,11 @@ const cl_RA I_I_div_RA (const cl_I& a, const cl_I& b)
 // Falls b>0: I_posI_div_RA anwenden.
 // Falls b<0: I_posI_div_RA auf (- a) und (- b) anwenden.
        if (eq(b,0))
-               cl_error_division_by_0();
+               throw division_by_0_exception();
        if (minusp(b))
                return I_posI_div_RA(-a,-b);
        else
                return I_posI_div_RA(a,b);
 }
+
+}  // namespace cln