X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Finteger%2Fbitwise%2Fcl_I_ash_I.cc;fp=src%2Finteger%2Fbitwise%2Fcl_I_ash_I.cc;h=f10e2e77735f0e27dbf13776ea38c36850595623;hb=c84c6db5d56829d69083c819688a973867694a2a;hp=0775e552ad7d9b8972a8ae64343591f17a3fd783;hpb=976a13157ca8d274a5bcbdac662cac538091e92c;p=cln.git diff --git a/src/integer/bitwise/cl_I_ash_I.cc b/src/integer/bitwise/cl_I_ash_I.cc index 0775e55..f10e2e7 100644 --- a/src/integer/bitwise/cl_I_ash_I.cc +++ b/src/integer/bitwise/cl_I_ash_I.cc @@ -35,7 +35,7 @@ const cl_I ash (const cl_I& x, const cl_I& y) if (!minusp(y)) { // y>=0 var uintL i; // i = y mod intDsize, >=0, =0, <2^intCsize + var uintC k; // k = y div intDsize, >=0, <2^intCsize if (bignump(y)) { #if (log2_intDsize+intCsize <= cl_value_len-1) // y >= 2^(cl_value_len-1) >= intDsize*2^intCsize @@ -86,7 +86,7 @@ const cl_I ash (const cl_I& x, const cl_I& y) var uintC len; var const uintD* x_LSDptr; I_to_NDS_nocopy(x, ,len=,x_LSDptr=,cl_false,); // DS zu x bilden. - if (k >= (uintC)(~(uintC)len)) // kann len+k+1 Überlauf geben? + if (k >= (uintC)(~len)) // kann len+k+1 Überlauf geben? { cl_ash_error(y); } // ja -> Fehler num_stack_alloc_1(len+k,,LSDptr=); LSDptr = clear_loop_lsp(LSDptr,k); // k Nulldigits @@ -111,7 +111,7 @@ const cl_I ash (const cl_I& x, const cl_I& y) } else { // y<0 var uintL i; // i = (-y) mod intDsize, >=0, =0, <2^intCsize + var uintC k; // k = (-y) div intDsize, >=0, <2^intCsize if (bignump(y)) { #if (log2_intDsize+intCsize <= cl_value_len-1) // -y-1 >= 2^(cl_value_len-1) >= intDsize*2^intCsize