-// cl_double_approx().
+// double_approx().
// General includes.
#include "cl_sysdep.h"
// Specification.
-#include "cl_rational.h"
+#include "cln/rational.h"
// Implementation.
#include "cl_DF.h"
#include "cl_RA.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
#include "cl_I.h"
#include "cl_F.h"
-double cl_double_approx (const cl_RA& x)
+namespace cln {
+
+double double_approx (const cl_RA& x)
{
// Method: same as cl_RA_to_DF().
if (integerp(x)) {
DeclareType(cl_I,x);
- return cl_double_approx(x);
+ return double_approx(x);
}
{ // x Ratio
DeclareType(cl_RT,x);
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 > DF_exp_high-DF_exp_mid) // Exponent >= n-m > Obergrenze ?
{
#if (cl_word_size==64)
return u.machine_double;
#endif
}}
+
+} // namespace cln