// float_approx().
// General includes.
-#include "cl_sysdep.h"
+#include "base/cl_sysdep.h"
// Specification.
#include "cln/rational.h"
// Implementation.
-#include "cl_FF.h"
-#include "cl_RA.h"
+#include "float/ffloat/cl_FF.h"
+#include "rational/cl_RA.h"
#include "cln/integer.h"
-#include "cl_I.h"
-#include "cl_F.h"
+#include "integer/cl_I.h"
+#include "float/cl_F.h"
namespace cln {
var const cl_I& b = denominator(x); // b
var cl_signean sign = -(cl_signean)minusp(a); // Vorzeichen
if (!(sign==0)) { a = -a; } // Betrag nehmen, liefert a
- var sintL lendiff = (sintL)integer_length(a) // (integer-length a)
- - (sintL)integer_length(b); // (integer-length b)
+ var sintC lendiff = (sintC)integer_length(a) // (integer-length a)
+ - (sintC)integer_length(b); // (integer-length b)
if (lendiff > FF_exp_high-FF_exp_mid) // Exponent >= n-m > Obergrenze ?
{ u.eksplicit = make_FF_word(sign,bit(FF_exp_len)-1,0); // Infinity
return u.machine_float;
{ zaehler = ash(a,(FF_mant_len+2) - lendiff); // (ash a -n+m+25)
nenner = b; // b
}
- // Division zaehler/nenner durchführen:
+ // Division zaehler/nenner durchführen:
var cl_I_div_t q_r = cl_divide(zaehler,nenner);
var cl_I& q = q_r.quotient;
var cl_I& r = q_r.remainder;