]> www.ginac.de Git - cln.git/blobdiff - src/float/lfloat/elem/cl_LF_1plus.cc
2006-04-25 Bruno Haible <bruno@clisp.org>
[cln.git] / src / float / lfloat / elem / cl_LF_1plus.cc
index 877fb2d8d7f0daf0c852abedd93e1512b0b6c617..00fcfe6782215a2377a007a8fc679a57ec41b61c 100644 (file)
@@ -14,6 +14,8 @@
 #include "cl_F.h"
 #include "cl_xmacros.h"
 
+namespace cln {
+
 const cl_LF LF_LF_plus_LF (const cl_LF& arg1, const cl_LF& arg2)
 {
 // Methode (nach [Knuth, II, Seminumerical Algorithms, Abschnitt 4.2.1., S.200]):
@@ -55,7 +57,7 @@ const cl_LF LF_LF_plus_LF (const cl_LF& arg1, const cl_LF& arg2)
               swap(uintL, uexp1,uexp2);
             }
         }
-      if (expdiff >= intDsize * (uintL)len + 2) // e1-e2 >= 16n+2 ?
+      if (expdiff >= intDsize * len + 2) // e1-e2 >= 16n+2 ?
         { return x1; } // ja -> x1 als Ergebnis
       // neues Long-Float allozieren:
       var Lfloat y = allocate_lfloat(len,uexp1,TheLfloat(x1)->sign);
@@ -151,7 +153,7 @@ const cl_LF LF_LF_plus_LF (const cl_LF& arg1, const cl_LF& arg2)
            }
            // UDS y_mantMSDptr/len/y_mantLSDptr/rounding_bits normalisieren:
            {var uintD* ptr = y_mantMSDptr;
-            var uintL k = 0;
+            var uintC k = 0;
             var uintC count;
             dotimesC(count,len,
               { if (!(mspref(ptr,0)==0)) goto nonzero_found;
@@ -238,3 +240,5 @@ const cl_LF LF_LF_plus_LF (const cl_LF& arg1, const cl_LF& arg2)
       // y fertig.
       return y;
 }
+
+}  // namespace cln