]> www.ginac.de Git - cln.git/blobdiff - src/float/lfloat/elem/cl_LF_I_mul.cc
Extend the exponent range from 32 bits to 64 bits on selected platforms.
[cln.git] / src / float / lfloat / elem / cl_LF_I_mul.cc
index 5d9dbabddccbd756786ac428bd21470b1bd01632..d83424a9ebe73b99059fe99f1b255c68cda696c9 100644 (file)
 // Implementation.
 
 #include "cl_LF_impl.h"
-#include "cl_integer.h"
+#include "cln/integer.h"
 #include "cl_I.h"
 #include "cl_DS.h"
 #include "cl_F.h"
 
+namespace cln {
+
 const cl_R cl_LF_I_mul (const cl_LF& x, const cl_I& y)
 {
 // Method:
@@ -26,7 +28,7 @@ const cl_R cl_LF_I_mul (const cl_LF& x, const cl_I& y)
        if (TheLfloat(x)->expo == 0) { return x; }
        var cl_signean sign = -(cl_signean)minusp(y); // Vorzeichen von y
        var cl_I abs_y = (sign==0 ? y : -y);
-       var uintL y_exp = integer_length(abs_y);
+       var uintC y_exp = integer_length(abs_y);
        var uintC len = TheLfloat(x)->len;
 #ifndef CL_LF_PEDANTIC
        if (ceiling(y_exp,intDsize) > len)
@@ -58,8 +60,8 @@ const cl_R cl_LF_I_mul (const cl_LF& x, const cl_I& y)
        }
        // Produkt ist nun normalisiert: höchstes Bit =1.
        // exponent := exponent(x) + intDsize*y_len - shiftcount
-       var uintL uexp = TheLfloat(x)->expo;
-       var uintL iexp = intDsize*y_len - shiftcount; // >= 0 !
+       var uintE uexp = TheLfloat(x)->expo;
+       var uintE iexp = intDsize*y_len - shiftcount; // >= 0 !
        uexp = uexp + iexp;
        if ((uexp < iexp) || (uexp > LF_exp_high))
                cl_error_floating_point_overflow();
@@ -86,3 +88,4 @@ const cl_R cl_LF_I_mul (const cl_LF& x, const cl_I& y)
 }
 // Bit complexity (N = max(length(x),length(y))): O(M(N)).
 
+}  // namespace cln