]> www.ginac.de Git - cln.git/commitdiff
* src/integer/conv/cl_I_from_digits.cc (digits_to_I): Fix thinko in
authorRichard Kreckel <kreckel@ginac.de>
Fri, 22 Oct 2004 23:11:50 +0000 (23:11 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Fri, 22 Oct 2004 23:11:50 +0000 (23:11 +0000)
        new code for base power of two.

ChangeLog
src/integer/conv/cl_I_from_digits.cc

index c6469341cc3571f4f8704547e3620e12935e4e7f..b8d7679832b57e4969713492294074f0ea7e2d07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-23  Richard B. Kreckel  <kreckel@ginac.de>
+
+       * src/integer/conv/cl_I_from_digits.cc (digits_to_I): Fix thinko in
+       new code for base power of two.
+
 2004-10-22  Richard B. Kreckel  <kreckel@ginac.de>
 
        * src/integer/conv/cl_I_to_digits (I_to_digits): Fix an elusive stack
index 76296aae93e41a49d90c256d3bb94b592887aa06..1f49bbdf65a36e6b1edea0abafad3f0c5b6cb38d 100644 (file)
@@ -23,7 +23,7 @@ const cl_I digits_to_I (const char * MSBptr, uintL len, uintD base)
         // Fast path for powers of two: write the digits from least\r
         // significant to most significant into the result NUDS.\r
         var int b = (base==2 ? 1 : base==4 ? 2 : base==8 ? 3 : base==16 ? 4 : /*base==32*/ 5);\r
-        num_stack_alloc(1+(len*b-1)/intDsize,,erg_LSDptr=);\r
+        num_stack_alloc(1+(len*b)/intDsize,,erg_LSDptr=);\r
         erg_MSDptr = erg_LSDptr; erg_len = 0;\r
         var uintD d = 0;  // resulting digit\r
         var int ch_where = 0;  // position of ch inside d\r