X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Ffloat%2Fdfloat%2Felem%2Fcl_DF_div.cc;h=786b866b15cd1cb88c87422943083ca467893999;hb=5370ad8054201cf23d4f94a52f4d3f7f9f3cd511;hp=3c18e5a71718a76634e1dfceac5b522f2287e611;hpb=dd9e0f894eec7e2a8cf85078330ddc0a6639090b;p=cln.git diff --git a/src/float/dfloat/elem/cl_DF_div.cc b/src/float/dfloat/elem/cl_DF_div.cc index 3c18e5a..786b866 100644 --- a/src/float/dfloat/elem/cl_DF_div.cc +++ b/src/float/dfloat/elem/cl_DF_div.cc @@ -4,7 +4,7 @@ #include "cl_sysdep.h" // Specification. -#include "cl_dfloat.h" +#include "cln/dfloat.h" // Implementation. @@ -15,12 +15,15 @@ #include "cl_low.h" #include "cl_DS.h" #include "cl_ieee.h" -NEED_IEEE_FLOATS() #undef MAYBE_INLINE #define MAYBE_INLINE inline #include "cl_DF_zerop.cc" +namespace cln { + +NEED_IEEE_FLOATS() + const cl_DF operator/ (const cl_DF& x1, const cl_DF& x2) { // Methode: @@ -66,10 +69,10 @@ const cl_DF operator/ (const cl_DF& x1, const cl_DF& x2) #if (cl_word_size==64) var uint64 mantx1; var uint64 mantx2; - DF_decode(x2, { cl_error_division_by_0(); }, sign2=,exp2=,mantx2=); + DF_decode(x2, { throw division_by_0_exception(); }, sign2=,exp2=,mantx2=); DF_decode(x1, { return x1; }, sign1=,exp1=,mantx1=); #else - DF_decode2(x2, { cl_error_division_by_0(); }, sign2=,exp2=,manthi2=,mantlo2=); + DF_decode2(x2, { throw division_by_0_exception(); }, sign2=,exp2=,manthi2=,mantlo2=); DF_decode2(x1, { return x1; }, sign1=,exp1=,manthi1=,mantlo1=); #endif exp1 = exp1 - exp2; // Differenz der Exponenten @@ -142,7 +145,7 @@ const cl_DF operator/ (const cl_DF& x1, const cl_DF& x2) // q = 2^32*manthi+mantlo. #if (cl_word_size==64) #if (intDsize<=32) - mantx = (manthi<<32) | (uint64)mantlo; + mantx = ((uint64)manthi<<32) | (uint64)mantlo; #endif if (mantx >= bit(DF_mant_len+2)) // Quotient >=2^54 -> 2 Bits wegrunden @@ -220,3 +223,5 @@ const cl_DF operator/ (const cl_DF& x1, const cl_DF& x2) #endif #endif } + +} // namespace cln