X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Finifcns_nstdsums.cpp;h=5cc4c7ce7552eead5824c075f1911f9a33feb5db;hp=4b8122d23e33151d487405ea07d951c085e40770;hb=11927b0eacfea55a57f477549e6dd7a7dab20716;hpb=9c1cf297cde7fb7d7cd863684c1754c3d140f93f diff --git a/ginac/inifcns_nstdsums.cpp b/ginac/inifcns_nstdsums.cpp index 4b8122d2..5cc4c7ce 100644 --- a/ginac/inifcns_nstdsums.cpp +++ b/ginac/inifcns_nstdsums.cpp @@ -189,7 +189,7 @@ cln::cl_N Li2_do_sum(const cln::cl_N& x) { cln::cl_N res = x; cln::cl_N resbuf; - cln::cl_N num = x; + cln::cl_N num = x * cln::cl_float(1, cln::float_format(Digits)); cln::cl_I den = 1; // n^2 = 1 unsigned i = 3; do { @@ -208,7 +208,7 @@ cln::cl_N Li2_do_sum_Xn(const cln::cl_N& x) { std::vector::const_iterator it = Xn[0].begin(); cln::cl_N u = -cln::log(1-x); - cln::cl_N factor = u; + cln::cl_N factor = u * cln::cl_float(1, cln::float_format(Digits)); cln::cl_N res = u - u*u/4; cln::cl_N resbuf; unsigned i = 1; @@ -226,7 +226,7 @@ cln::cl_N Li2_do_sum_Xn(const cln::cl_N& x) // calculates Li(n,x), n>2 without Xn cln::cl_N Lin_do_sum(int n, const cln::cl_N& x) { - cln::cl_N factor = x; + cln::cl_N factor = x * cln::cl_float(1, cln::float_format(Digits)); cln::cl_N res = x; cln::cl_N resbuf; int i=2; @@ -245,7 +245,7 @@ cln::cl_N Lin_do_sum_Xn(int n, const cln::cl_N& x) { std::vector::const_iterator it = Xn[n-2].begin(); cln::cl_N u = -cln::log(1-x); - cln::cl_N factor = u; + cln::cl_N factor = u * cln::cl_float(1, cln::float_format(Digits)); cln::cl_N res = u; cln::cl_N resbuf; unsigned i=2; @@ -846,7 +846,9 @@ cln::cl_N S_do_sum(int n, int p, const cln::cl_N& x, const cln::float_format_t& } // should be done otherwise - cln::cl_N xf = x * cln::cl_float(1, prec); + cln::cl_F one = cln::cl_float(1, cln::float_format(Digits)); + cln::cl_N xf = x * one; + //cln::cl_N xf = x * cln::cl_float(1, prec); cln::cl_N res; cln::cl_N resbuf;