- suppress zero-terms in expansion.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Mon, 3 Jul 2000 23:42:50 +0000 (23:42 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Mon, 3 Jul 2000 23:42:50 +0000 (23:42 +0000)
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 << '+';