Within mLi_numeric, set signs of the imaginary parts correctly for G_numeric.
authorStefan Weinzierl <stefanw@thep.physik.uni-mainz.de>
Sun, 12 Jan 2014 22:07:28 +0000 (22:07 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Sun, 12 Jan 2014 22:07:28 +0000 (22:07 +0000)
ginac/inifcns_nstdsums.cpp

index 7487b31..043d93a 100644 (file)
@@ -1201,9 +1201,14 @@ ex mLi_numeric(const lst& m, const lst& x)
                        s.push_back(1);
                }
                const cln::cl_N xi = ex_to<numeric>(*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)));
 }