]> www.ginac.de Git - ginac.git/commitdiff
Fixed bug occuring in algebraic substitutions with expressions involving
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 12 Sep 2005 14:50:32 +0000 (14:50 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 12 Sep 2005 14:50:32 +0000 (14:50 +0000)
indices. [C.Dams]

ginac/power.cpp

index 8a0156e4d8627d4e7cf5bcb28e72e1aaa572375f..339b48c1a3cfd067ef692ea968082e0ff3102b7b 100644 (file)
@@ -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);