]> www.ginac.de Git - ginac.git/blobdiff - ginac/mul.cpp
Fixed a bug introduced in last commit.
[ginac.git] / ginac / mul.cpp
index 6810cb8dbb408360fbb37e672e15e8db54becfd5..27add930cf56863ae7d635d3031e4dc2b1d7ea9f 100644 (file)
@@ -347,6 +347,17 @@ bool mul::info(unsigned inf) const
        return inherited::info(inf);
 }
 
+bool mul::is_polynomial(const ex & var) const
+{
+       for (epvector::const_iterator i=seq.begin(); i!=seq.end(); ++i) {
+               if (!i->rest.is_polynomial(var) ||
+                   (i->rest.has(var) && !i->coeff.info(info_flags::integer))) {
+                       return false;
+               }
+       }
+       return true;
+}
+
 int mul::degree(const ex & s) const
 {
        // Sum up degrees of factors