fixed a bug in the dummy index symmetrization [Chris Dams]
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Thu, 21 Nov 2002 19:22:39 +0000 (19:22 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Thu, 21 Nov 2002 19:22:39 +0000 (19:22 +0000)
ginac/indexed.cpp

index a52d6d7..e32f4c7 100644 (file)
@@ -820,13 +820,13 @@ public:
 
        symminfo(const ex & symmterm_, const ex & orig_)
        {
-               if (is_a<mul>(orig_)) {
+               if (is_a<mul>(orig_) && is_a<numeric>(orig_.op(orig_.nops()-1))) {
                        ex tmp = orig_.op(orig_.nops()-1);
                        orig = orig_ / tmp;
                } else 
                        orig = orig_;
 
-               if (is_a<mul>(symmterm_)) {
+               if (is_a<mul>(symmterm_) && is_a<numeric>(symmterm_.op(symmterm_.nops()-1))) {
                        coeff = symmterm_.op(symmterm_.nops()-1);
                        symmterm = symmterm_ / coeff;
                } else {