#include "cln/number.h"
#include "cln/malloc.h"
-#include "cl_low.h"
-#include "cl_F.h"
+#include "base/cl_low.h"
+#include "float/cl_F.h"
#ifdef FAST_DOUBLE
-#include "cl_N.h"
-#include "cl_F.h"
+#include "base/cl_N.h"
+#include "float/cl_F.h"
#endif
namespace cln {
{ zero_statement } /* e=0 -> Zahl 0.0 */ \
else \
{ exp_zuweisung (sintL)(uexp - DF_exp_mid); /* Exponent */ \
- unused (sign_zuweisung ((sint64)_x >> 63)); /* Vorzeichen */ \
+ cl_unused (sign_zuweisung ((sint64)_x >> 63)); /* Vorzeichen */ \
mant_zuweisung (bit(DF_mant_len) | (_x & (bit(DF_mant_len)-1))); \
} }
#else
{ zero_statement } /* e=0 -> Zahl 0.0 */ \
else \
{ exp_zuweisung (sintL)(uexp - DF_exp_mid); /* Exponent */ \
- unused (sign_zuweisung sign_of((sint32)(semhi))); /* Vorzeichen */\
+ cl_unused (sign_zuweisung sign_of((sint32)(semhi))); /* Vorzeichen */\
manthi_zuweisung (bit(DF_mant_len-32) | (semhi & (bit(DF_mant_len-32)-1))); \
mantlo_zuweisung mlo; \
} }
// encode_DF(sign,exp,mant)
// liefert ein Double-Float.
// > cl_signean sign: Vorzeichen, 0 für +, -1 für negativ.
-// > sintL exp: Exponent
+// > sintE exp: Exponent
// > uintQ mant: Mantisse, sollte >= 2^DF_mant_len und < 2^(DF_mant_len+1) sein.
// < cl_DF ergebnis: ein Double-Float
// Der Exponent wird auf Überlauf/Unterlauf getestet.
-inline const cl_DF encode_DF (cl_signean sign, sintL exp, uintQ mant)
+inline const cl_DF encode_DF (cl_signean sign, sintE exp, uintQ mant)
{
- if (exp < (sintL)(DF_exp_low-DF_exp_mid))
+ if (exp < (sintE)(DF_exp_low-DF_exp_mid))
{ if (underflow_allowed())
{ throw floating_point_underflow_exception(); }
else
{ return cl_DF_0; }
}
else
- if (exp > (sintL)(DF_exp_high-DF_exp_mid))
+ if (exp > (sintE)(DF_exp_high-DF_exp_mid))
{ throw floating_point_overflow_exception(); }
else
return allocate_dfloat
// encode_DF(sign,exp,manthi,mantlo)
// liefert ein Double-Float.
// > cl_signean sign: Vorzeichen, 0 für +, -1 für negativ.
-// > sintL exp: Exponent
+// > sintE exp: Exponent
// > uintL manthi,mantlo: Mantisse 2^32*manthi+mantlo,
// sollte >= 2^DF_mant_len und < 2^(DF_mant_len+1) sein.
// < cl_DF ergebnis: ein Double-Float
// Der Exponent wird auf Überlauf/Unterlauf getestet.
-inline const cl_DF encode_DF (cl_signean sign, sintL exp, uintL manthi, uintL mantlo)
+inline const cl_DF encode_DF (cl_signean sign, sintE exp, uintL manthi, uintL mantlo)
{
- if (exp < (sintL)(DF_exp_low-DF_exp_mid))
+ if (exp < (sintE)(DF_exp_low-DF_exp_mid))
{ if (underflow_allowed())
{ throw floating_point_underflow_exception(); }
else
{ return cl_DF_0; }
}
else
- if (exp > (sintL)(DF_exp_high-DF_exp_mid))
+ if (exp > (sintE)(DF_exp_high-DF_exp_mid))
{ throw floating_point_overflow_exception(); }
else
return allocate_dfloat