]> www.ginac.de Git - cln.git/blobdiff - src/real/elem/cl_R_equal.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / real / elem / cl_R_equal.cc
index 6d6f17eb604968916dd42f01409d811a4edaf1c4..032ba3f5220400889cd7d93896c945e2b99e49ab 100644 (file)
@@ -1,24 +1,26 @@
-// cl_equal().
+// equal().
 
 // General includes.
 #include "cl_sysdep.h"
 
 // Specification.
-#include "cl_real.h"
+#include "cln/real.h"
 
 
 // Implementation.
 
 #include "cl_R.h"
 #include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
 
-inline cl_boolean cl_equal (const cl_F& x, const cl_F& y)
+namespace cln {
+
+inline cl_boolean equal (const cl_F& x, const cl_F& y)
 {
-       return (cl_boolean) (cl_compare(x,y) == 0);
+       return (cl_boolean) (compare(x,y) == 0);
 }
 
-cl_boolean cl_equal (const cl_R& x, const cl_R& y)
+cl_boolean equal (const cl_R& x, const cl_R& y)
 {
 // Methode:
 // Beide rational oder beide Floats -> klar.
@@ -30,23 +32,25 @@ cl_boolean cl_equal (const cl_R& x, const cl_R& y)
        realcase2(x
        ,       realcase2(y
                ,       // beides rationale Zahlen
-                       return cl_equal(x,y);
+                       return equal(x,y);
                ,       // x rational, y Float -> x in Float umwandeln
                        if (!power2p(denominator(x)))
                                return cl_false;
-                       if (!cl_equal(cl_float(x,y),y))
+                       if (!equal(cl_float(x,y),y))
                                return cl_false;
-                       return cl_equal(x,rational(y));
+                       return equal(x,rational(y));
                );
        ,       realcase2(y
                ,       // x Float, y rational -> y in Float umwandeln
                        if (!power2p(denominator(y)))
                                return cl_false;
-                       if (!cl_equal(x,cl_float(y,x)))
+                       if (!equal(x,cl_float(y,x)))
                                return cl_false;
-                       return cl_equal(rational(x),y);
+                       return equal(rational(x),y);
                ,       // beides Floats
-                       return cl_equal(x,y);
+                       return equal(x,y);
                );
        );
 }
+
+}  // namespace cln