]> www.ginac.de Git - cln.git/blobdiff - src/rational/algebraic/cl_RA_sqrtp.cc
* */*: Convert encoding from ISO 8859-1 to UTF-8.
[cln.git] / src / rational / algebraic / cl_RA_sqrtp.cc
index f3414829dacaa99d9d763538cd8b5b57962110aa..c5347792e0ff66a2a8dbbee0e3398a20a1c8f515 100644 (file)
 
 namespace cln {
 
-cl_boolean sqrtp (const cl_RA& x, cl_RA* w)
+bool sqrtp (const cl_RA& x, cl_RA* w)
 {
 // Methode:
 // Bei Integers: klar.
-// Bei Brüchen a/b : muß a=c^2 und b=d^2 sein. Dann ist die Wurzel = c/d
+// Bei Brüchen a/b : muß a=c^2 und b=d^2 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 sqrtp (const cl_RA& x, cl_RA* w)
        var const cl_I& b = denominator(x);
        var cl_I d;
        if (!sqrtp(b,&d)) // Nenner auf Quadratzahl testen
-               return cl_false;
+               return false;
        var const cl_I& a = numerator(x);
        var cl_I c;
-       if (!sqrtp(a,&c)) // Zähler auf Quadratzahl testen
-               return cl_false;
+       if (!sqrtp(a,&c)) // Zähler auf Quadratzahl testen
+               return false;
        // beides Quadratzahlen -> 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