From: Jens Vollinga Date: Mon, 12 Sep 2005 14:50:32 +0000 (+0000) Subject: Fixed bug occuring in algebraic substitutions with expressions involving X-Git-Tag: release_1-4-0~154 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=7d6eeaeab9327e8a3349df45fb6cc6486bb43162 Fixed bug occuring in algebraic substitutions with expressions involving indices. [C.Dams] --- diff --git a/ginac/power.cpp b/ginac/power.cpp index 8a0156e4..339b48c1 100644 --- a/ginac/power.cpp +++ b/ginac/power.cpp @@ -858,7 +858,7 @@ ex power::expand_mul(const mul & m, const numeric & n, unsigned options, bool fr } // Leave it to multiplication since dummy indices have to be renamed - if (get_all_dummy_indices(m).size() > 0) { + if (get_all_dummy_indices(m).size() > 0 && n.is_positive()) { ex result = m; for (int i=1; i < n.to_int(); i++) result *= rename_dummy_indices_uniquely(m,m);