Browse Source

* src/integer/conv/cl_I_from_digits.cc (digits_to_I): Fix thinko in

new code for base power of two.
master
Richard Kreckel 20 years ago
parent
commit
b31a3a904d
  1. 5
      ChangeLog
  2. 2
      src/integer/conv/cl_I_from_digits.cc

5
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

2
src/integer/conv/cl_I_from_digits.cc

@ -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
// significant to most significant into the result NUDS.
var int b = (base==2 ? 1 : base==4 ? 2 : base==8 ? 3 : base==16 ? 4 : /*base==32*/ 5);
num_stack_alloc(1+(len*b-1)/intDsize,,erg_LSDptr=);
num_stack_alloc(1+(len*b)/intDsize,,erg_LSDptr=);
erg_MSDptr = erg_LSDptr; erg_len = 0;
var uintD d = 0; // resulting digit
var int ch_where = 0; // position of ch inside d

Loading…
Cancel
Save