]> www.ginac.de Git - ginac.git/blobdiff - ginac/pseries.cpp
- suppress zero-terms in expansion.
[ginac.git] / ginac / pseries.cpp
index 9ed6aab3cc71e901e69f972100193bd2ca81cdba..0782be07ebd34aaeb108e2358b6fd8328422360f 100644 (file)
@@ -165,6 +165,9 @@ void pseries::print(ostream &os, unsigned upper_precedence) const
 {
     debugmsg("pseries print", LOGLEVEL_PRINT);
     for (epvector::const_iterator i=seq.begin(); i!=seq.end(); i++) {
+        // omit zero terms
+        if (i->rest.is_zero())
+            continue;
         // print a sign, if needed
         if (i!=seq.begin())
             os << '+';