From 9a69e9de24bc228830b5cdf02648edd860e04f8e Mon Sep 17 00:00:00 2001 From: Stefan Weinzierl Date: Sun, 12 Jan 2014 22:07:28 +0000 Subject: [PATCH] Within mLi_numeric, set signs of the imaginary parts correctly for G_numeric. --- ginac/inifcns_nstdsums.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ginac/inifcns_nstdsums.cpp b/ginac/inifcns_nstdsums.cpp index 7487b314..043d93a8 100644 --- a/ginac/inifcns_nstdsums.cpp +++ b/ginac/inifcns_nstdsums.cpp @@ -1201,9 +1201,14 @@ ex mLi_numeric(const lst& m, const lst& x) s.push_back(1); } const cln::cl_N xi = ex_to(*itx).to_cl_N(); - newx.push_back(factor/xi); factor = factor/xi; - s.push_back(1); + newx.push_back(factor); + if ( !instanceof(factor, cln::cl_R_ring) && imagpart(factor) < 0 ) { + s.push_back(-1); + } + else { + s.push_back(1); + } } return numeric(cln::cl_N(1 & m.nops() ? - 1 : 1)*G_numeric(newx, s, cln::cl_N(1))); } -- 2.44.0