]> www.ginac.de Git - cln.git/blobdiff - src/rational/algebraic/cl_RA_rootp.cc
Remove internal inline versions of numerator/denominator(cl_RA).
[cln.git] / src / rational / algebraic / cl_RA_rootp.cc
index 0ad2dbad949e64d895bd1c2ecf266a6e1efc6f7a..a06a5d592ed19ae9a9aa0051a1ac184f3fc36cd0 100644 (file)
@@ -1,7 +1,7 @@
 // rootp().
 
 // General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
 
 // Specification.
 #include "cln/rational.h"
@@ -9,16 +9,16 @@
 
 // Implementation.
 
-#include "cl_RA.h"
+#include "rational/cl_RA.h"
 #include "cln/integer.h"
 
 namespace cln {
 
-cl_boolean rootp (const cl_RA& x, uintL n, cl_RA* w)
+bool rootp (const cl_RA& x, uintL n, cl_RA* w)
 {
 // Methode:
 // Bei Integers: klar.
-// Bei Brüchen a/b : muß a=c^n und b=d^n sein. Dann ist die Wurzel = c/d
+// Bei Brüchen a/b : muß a=c^n und b=d^n sein. Dann ist die Wurzel = c/d
 // (mit ggT(c,d)=1 und d>1).
        if (integerp(x)) {
                DeclareType(cl_I,x);
@@ -29,13 +29,13 @@ cl_boolean rootp (const cl_RA& x, uintL n, cl_RA* w)
        var const cl_I& b = denominator(x);
        var cl_I d;
        if (!rootp(b,n,&d)) // Nenner auf n-te Potenz testen
-               return cl_false;
+               return false;
        var const cl_I& a = numerator(x);
        var cl_I c;
-       if (!rootp(a,n,&c)) // Zähler auf n-te Potenz testen
-               return cl_false;
+       if (!rootp(a,n,&c)) // Zähler auf n-te Potenz testen
+               return false;
        // beides n-te Potenzen -> Quotient der Wurzeln bilden
-       *w = I_I_to_RT(c,d); return cl_true;
+       *w = I_I_to_RT(c,d); return true;
 }}
 
 }  // namespace cln