From 511e167db491dba2288fd164b9cc044a7073ce56 Mon Sep 17 00:00:00 2001 From: Jens Vollinga Date: Tue, 18 Nov 2003 15:15:10 +0000 Subject: [PATCH] * Fixed bug in zeta(m,s). * Li({},{}) has improved sum-loop now. --- ginac/inifcns_nstdsums.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ginac/inifcns_nstdsums.cpp b/ginac/inifcns_nstdsums.cpp index fbc4a3fa..8e295bf2 100644 --- a/ginac/inifcns_nstdsums.cpp +++ b/ginac/inifcns_nstdsums.cpp @@ -407,12 +407,19 @@ cln::cl_N multipleLi_do_sum(const std::vector& s, const std::vector=0; k--) { t[k] = t[k] + t[k+1] * cln::expt(x[k], q+j-1-k) / cln::expt(cln::cl_I(q+j-1-k), s[k]); } - } while ((t[0] != t0buf) || (q<10)); + // ... and do it again (to avoid premature drop out due to special arguments) + q++; + t[j-1] = t[j-1] + cln::expt(x[j-1], q) / cln::expt(cln::cl_I(q),s[j-1]) * one; + for (int k=j-2; k>=0; k--) { + t[k] = t[k] + t[k+1] * cln::expt(x[k], q+j-1-k) / cln::expt(cln::cl_I(q+j-1-k), s[k]); + } + } while (t[0] != t0buf); return t[0]; } @@ -1851,16 +1858,12 @@ cln::cl_N zeta_do_Hoelder_convolution(const std::vector& m_, const std::vec } else { if (m_p.front() == 1) { m_p.erase(m_p.begin()); + cln::cl_N spbuf = s_p.front(); s_p.erase(s_p.begin()); if (s_p.size() > 0) { - s_p.front() = s_p.front() * cln::cl_N("1/2"); + s_p.front() = s_p.front() * spbuf; } s.erase(s.begin()); - for (int i=0; i 0) break; - - } m_q.insert(m_q.begin(), 1); if (s_q.size() > 0) { s_q.front() = s_q.front() * 4; -- 2.44.0