]> www.ginac.de Git - cln.git/blobdiff - src/float/output/cl_F_dprint.cc
2006-04-25 Bruno Haible <bruno@clisp.org>
[cln.git] / src / float / output / cl_F_dprint.cc
index 4d5e6c78ff9c120d0cca9b24dc258e549914da18..79d182c1052aa237995b4b25b7091d99b66a6f3e 100644 (file)
@@ -80,7 +80,7 @@ static const cl_decimal_decoded_float decode_float_decimal (const cl_F& x)
   // x/=0, also ist sign das Vorzeichen von x und
   // |x| = 2^binexpo * float(binmant,x) . Ab jetzt oBdA x>0.
   // Also x = 2^binexpo * float(binmant,x) .
-  var uintL l = integer_length(binmant); // Anzahl der Bits von binmant, >=3
+  var uintC l = integer_length(binmant); // Anzahl der Bits von binmant, >=3
   var cl_I binmant2 = ash(binmant,1); // 2*binmant
   var cl_I oben = plus1(binmant2); // obere Intervallgrenze ist
                                    // (x+x2)/2 = 2^(binexpo-1) * oben
@@ -101,7 +101,7 @@ static const cl_decimal_decoded_float decode_float_decimal (const cl_F& x)
   // Wandle dazu 2^e := 2^(binexpo-1) ins Dezimalsystem um.
   var cl_I e = binexpo - 1;
   var bool e_gross = (abs(e) > ash(l,1)); // Ist |e| recht groß, >2*l ?
-  var uintL g;     // Hilfsvariablen für den Fall, daß |e| groß ist
+  var uintC g;     // Hilfsvariablen für den Fall, daß |e| groß ist
   var cl_I f;      //
   var cl_I zehn_d; // Hilfsvariable 10^|d| für den Fall, daß |e| klein ist
   var cl_I d;  // Ergebnisvariablen
@@ -390,13 +390,13 @@ void print_float (std::ostream& stream, const cl_print_float_flags& flags, const
     // erst Null und Punkt, dann -expo Nullen, dann alle Ziffern
     fprintchar(stream,'0');
     fprintchar(stream,'.');
-    for (uintL i = -FN_to_L(expo); i > 0; i--)
+    for (uintV i = -FN_to_V(expo); i > 0; i--)
       fprintchar(stream,'0');
     fprint(stream,mantstring);
     expo = 0; // auszugebender Exponent ist 0
   } else {
     // "fixed-point notation" mit expo > 0 oder "scientific notation"
-    var uintL scale = (flag ? FN_to_L(expo) : 1);
+    var uintV scale = (flag ? FN_to_V(expo) : 1);
     // Der Dezimalpunkt wird um scale Stellen nach rechts geschoben,
     // d.h. es gibt scale Vorkommastellen. scale > 0.
     if (scale < mantlen) {
@@ -412,7 +412,7 @@ void print_float (std::ostream& stream, const cl_print_float_flags& flags, const
       // scale>=mantlen -> es bleibt nichts für die Nachkommastellen.
       // alle Ziffern, dann scale-mantlen Nullen, dann Punkt und Null
       fprint(stream,mantstring);
-      for (uintL i = mantlen; i < scale; i++)
+      for (uintV i = mantlen; i < scale; i++)
         fprintchar(stream,'0');
       fprintchar(stream,'.');
       fprintchar(stream,'0');