#include "cl_sysdep.h"
// Specification.
-#include "cl_dfloat.h"
+#include "cln/dfloat.h"
// Implementation.
#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:
#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
// 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
#endif
#endif
}
+
+} // namespace cln