From fb45203612dcfd2e30f6e7a43273597bcd13f026 Mon Sep 17 00:00:00 2001 From: Jens Vollinga Date: Thu, 3 Apr 2008 11:56:57 +0200 Subject: [PATCH] Fixed bugs found by Jianqiang Zhao. --- ginac/inifcns_nstdsums.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ginac/inifcns_nstdsums.cpp b/ginac/inifcns_nstdsums.cpp index e92e8eb2..138f5e34 100644 --- a/ginac/inifcns_nstdsums.cpp +++ b/ginac/inifcns_nstdsums.cpp @@ -492,6 +492,12 @@ cln::cl_N multipleLi_do_sum(const std::vector& s, const std::vector=0; k--) { + flag_accidental_zero = cln::zerop(t[k+1]); + 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) || flag_accidental_zero ); return t[0]; @@ -991,7 +997,7 @@ ex G_numeric(const lst& x, const lst& s, const ex& y) if (x.op(x.nops()-1).is_zero()) { need_trafo = true; } - if (depth == 1 && !need_trafo) { + if (depth == 1 && x.nops() == 2 && !need_trafo) { return -Li(x.nops(), y / x.op(x.nops()-1)).evalf(); } -- 2.44.0