X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Freal%2Felem%2Fcl_R_equal.cc;fp=src%2Freal%2Felem%2Fcl_R_equal.cc;h=032ba3f5220400889cd7d93896c945e2b99e49ab;hb=850abfde7f0d985ba01526c346bcd0d733562943;hp=6d6f17eb604968916dd42f01409d811a4edaf1c4;hpb=e0b64ba4f92bb0323e5b241b465d17389ceff2d9;p=cln.git diff --git a/src/real/elem/cl_R_equal.cc b/src/real/elem/cl_R_equal.cc index 6d6f17e..032ba3f 100644 --- a/src/real/elem/cl_R_equal.cc +++ b/src/real/elem/cl_R_equal.cc @@ -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