Fixed log-patch.
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 19 Apr 2004 16:11:09 +0000 (16:11 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 19 Apr 2004 16:11:09 +0000 (16:11 +0000)
ginac/inifcns_trans.cpp

index 872308b93f54e234a99ebf493a4416b4d6b7f1a8..dc19fb6dc27358df7efacec6a13cd83878168fd9 100644 (file)
@@ -200,7 +200,6 @@ static ex log_series(const ex &arg,
                if (!argser.is_terminating() || argser.nops()!=1) {
                        // in this case n more (or less) terms are needed
                        // (sadly, to generate them, we have to start from the beginning)
-                       const ex newarg = ex_to<pseries>((arg/coeff).series(rel, order+n, options)).shift_exponents(-n).convert_to_poly(true);
                        if (n == 0 && coeff == 1) {
                                epvector epv;
                                ex acc = (new pseries(rel, epv))->setflag(status_flags::dynallocated);
@@ -217,6 +216,7 @@ static ex log_series(const ex &arg,
                                }
                                return acc;
                        }
+                       const ex newarg = ex_to<pseries>((arg/coeff).series(rel, order+n, options)).shift_exponents(-n).convert_to_poly(true);
                        return pseries(rel, seq).add_series(ex_to<pseries>(log(newarg).series(rel, order, options)));
                } else  // it was a monomial
                        return pseries(rel, seq);