X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Findexed.cpp;h=e32f4c7a103f047cc09a5332665b7ef0e6c91ef8;hp=a52d6d77dc52b58b3e44f19531faac6ee7cc749e;hb=e93f20fd0deb9b45d2163cbec247e5181f021a28;hpb=0f617ea4ea1dc6a33cae5e2ce518b26d8055c177 diff --git a/ginac/indexed.cpp b/ginac/indexed.cpp index a52d6d77..e32f4c7a 100644 --- a/ginac/indexed.cpp +++ b/ginac/indexed.cpp @@ -820,13 +820,13 @@ public: symminfo(const ex & symmterm_, const ex & orig_) { - if (is_a(orig_)) { + if (is_a(orig_) && is_a(orig_.op(orig_.nops()-1))) { ex tmp = orig_.op(orig_.nops()-1); orig = orig_ / tmp; } else orig = orig_; - if (is_a(symmterm_)) { + if (is_a(symmterm_) && is_a(symmterm_.op(symmterm_.nops()-1))) { coeff = symmterm_.op(symmterm_.nops()-1); symmterm = symmterm_ / coeff; } else {