]> www.ginac.de Git - cln.git/blobdiff - src/float/lfloat/elem/cl_LF_fround.cc
Extend the exponent range from 32 bits to 64 bits on selected platforms.
[cln.git] / src / float / lfloat / elem / cl_LF_fround.cc
index 8decf62d8cea6b0bcf1c8a9e1d6d7145e63ad066..979a2e740bbed757d8e62682d3f4944b1c69b646 100644 (file)
@@ -24,18 +24,18 @@ const cl_LF fround (const cl_LF& x)
 // e>=16n -> Ergebnis x
 #if 0
       var cl_signean sign;
-      var sintL exp;
+      var sintE exp;
       var const uintD* mantMSDptr;
       var uintC mantlen;
       LF_decode(x, { return x; }, sign=,exp=,mantMSDptr=,mantlen=,);
       if (exp<0) { return encode_LF0(mantlen); } // e<0 -> Ergebnis 0.0
-      if ((uintL)exp >= intDsize*mantlen) // e>=16n -> x als Ergebnis
+      if ((uintE)exp >= intDsize*mantlen) // e>=16n -> x als Ergebnis
         { return x; }
         else
         // 0 <= e < 16n
         { // alle hinteren 16n-e Bits wegrunden:
-          var uintC count = floor((uintL)exp,intDsize); // zu kopierende Digits, < mantlen
-          var uintC bitcount = ((uintL)exp) % intDsize; // zu kopierende Bits danach, >=0, <intDsize
+          var uintC count = floor((uintE)exp,intDsize); // zu kopierende Digits, < mantlen
+          var uintC bitcount = ((uintE)exp) % intDsize; // zu kopierende Bits danach, >=0, <intDsize
           var uintD mask = minus_bit(intDsize-bitcount-1); // Maske mit bitcount+1 Bits
           var const uintD* mantptr = mantMSDptr mspop count;
           if ((mspref(mantptr,0) & -mask) ==0) goto ab; // Bit 16n-e-1 =0 -> abrunden
@@ -75,12 +75,12 @@ const cl_LF fround (const cl_LF& x)
         }
 #else
       var uintC len = TheLfloat(x)->len;
-      var uintL uexp = TheLfloat(x)->expo;
+      var uintE uexp = TheLfloat(x)->expo;
       if (uexp < LF_exp_mid)
         { if (uexp == 0) { return x; } // x=0.0 -> Ergebnis 0.0
           return encode_LF0(len); // e<0 -> Ergebnis 0.0
         }
-      var uintL exp = uexp - LF_exp_mid;
+      var uintE exp = uexp - LF_exp_mid;
       if (exp >= intDsize*len) // e>=16n -> x als Ergebnis
         { return x; }
       // 0 <= e < 16n