]> www.ginac.de Git - cln.git/blobdiff - src/float/lfloat/elem/cl_LF_div.cc
Extend the exponent range from 32 bits to 64 bits on selected platforms.
[cln.git] / src / float / lfloat / elem / cl_LF_div.cc
index 3d4aa2a2fd5cb33e19214ba6a035608cc25aeec8..318b83d5bbe1170fa3f974b101e3bcd5732859cd 100644 (file)
@@ -41,9 +41,9 @@ const cl_LF operator/ (const cl_LF& x1, const cl_LF& x2)
       var uintC len1 = TheLfloat(x1)->len;
       var uintC len2 = TheLfloat(x2)->len;
       var uintC len = (len1 < len2 ? len1 : len2); // min. Länge n von x1 und x2
-      var uintL uexp2 = TheLfloat(x2)->expo;
+      var uintE uexp2 = TheLfloat(x2)->expo;
       if (uexp2==0) { cl_error_division_by_0(); } // x2=0.0 -> Error
-      var uintL uexp1 = TheLfloat(x1)->expo;
+      var uintE uexp1 = TheLfloat(x1)->expo;
       if (uexp1==0) // x1=0.0 -> Ergebnis 0.0
         { if (len < len1) return shorten(x1,len); else return x1; }
       // Exponenten subtrahieren:
@@ -55,7 +55,7 @@ const cl_LF operator/ (const cl_LF& x1, const cl_LF& x2)
         }
         else
         { uexp1 = uexp1 - uexp2; // Carry
-          if (uexp1 < (uintL)(LF_exp_low-1-LF_exp_mid))
+          if (uexp1 < (uintE)(LF_exp_low-1-LF_exp_mid))
             { if (underflow_allowed())
                 { cl_error_floating_point_underflow(); }
                 else
@@ -69,7 +69,7 @@ const cl_LF operator/ (const cl_LF& x1, const cl_LF& x2)
                                      TheLfloat(x1)->sign ^ TheLfloat(x2)->sign // Vorzeichen kombinieren
                                     );
       // Nenner bilden:
-      var uintL n_len;
+      var uintC n_len;
       n_len = len2;
 #ifndef CL_LF_PEDANTIC
       if (n_len > len) { n_len = len+1; }
@@ -77,7 +77,7 @@ const cl_LF operator/ (const cl_LF& x1, const cl_LF& x2)
       // Zähler bilden:
       CL_ALLOCA_STACK;
       var uintD* z_MSDptr;
-      var uintL z_len;
+      var uintC z_len;
       var uintD* z_LSDptr;
       z_len = n_len + len + 1;
       num_stack_alloc(z_len, z_MSDptr=,z_LSDptr=);