From: Christian Bauer Date: Mon, 22 Jul 2002 20:32:49 +0000 (+0000) Subject: canonicalize() failed to return zero for an antisymmetric combination of two X-Git-Tag: release_1-0-10~3 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=8c51f6869173c7eb163cd29f351ea9f1e3716062 canonicalize() failed to return zero for an antisymmetric combination of two or more equal elements if the elements were already in their canonical order --- diff --git a/ginac/symmetry.cpp b/ginac/symmetry.cpp index 8a766214..c953953a 100644 --- a/ginac/symmetry.cpp +++ b/ginac/symmetry.cpp @@ -304,7 +304,7 @@ public: int canonicalize(exvector::iterator v, const symmetry &symm) { - // Less than two indices? Then do nothing + // Less than two elements? Then do nothing if (symm.indices.size() < 2) return INT_MAX; @@ -334,6 +334,8 @@ int canonicalize(exvector::iterator v, const symmetry &symm) case symmetry::antisymmetric: // Sort the children in ascending order, keeping track of the signum sign *= permutation_sign(first, last, sy_is_less(v), sy_swap(v, something_changed)); + if (sign == 0) + return 0; break; case symmetry::cyclic: // Permute the smallest child to the front