// scale_float().
// General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
// Specification.
#include "cln/dfloat.h"
// Implementation.
-#include "cl_DF.h"
-#include "cl_F.h"
+#include "float/dfloat/cl_DF.h"
+#include "float/cl_F.h"
namespace cln {
-const cl_DF scale_float (const cl_DF& x, sintL delta)
+const cl_DF scale_float (const cl_DF& x, sintC delta)
{
// Methode:
// x=0.0 -> x als Ergebnis
- // delta muß betragsmäßig <= DF_exp_high-DF_exp_low sein.
- // Neues DF mit um delta vergrößertem Exponenten bilden.
+ // delta muß betragsmäßig <= DF_exp_high-DF_exp_low sein.
+ // Neues DF mit um delta vergrößertem Exponenten bilden.
// x entpacken:
var cl_signean sign;
var sintL exp;
#endif
if (delta >= 0)
// delta>=0
- { var uintL udelta = delta;
+ { var uintC udelta = delta;
if (udelta <= (uintL)(DF_exp_high-DF_exp_low))
{ exp = exp+udelta;
#if (cl_word_size==64)
#endif
}
else
- { cl_error_floating_point_overflow(); }
+ { throw floating_point_overflow_exception(); }
}
else
// delta<0
- { var uintL udelta = -delta;
+ { var uintC udelta = -delta;
if (udelta <= (uintL)(DF_exp_high-DF_exp_low))
{ exp = exp-udelta;
#if (cl_word_size==64)
}
else
if (underflow_allowed())
- { cl_error_floating_point_underflow(); }
+ { throw floating_point_underflow_exception(); }
else
{ return cl_DF_0; }
}