]> www.ginac.de Git - ginac.git/blobdiff - ginac/numeric.cpp
Fixed bug in ::match.
[ginac.git] / ginac / numeric.cpp
index 18943d3fdfb1f37f5b32506b4a96a27f82328a0a..278741f1e43aec63aa875dd56dd8092687ff58b6 100644 (file)
@@ -603,6 +603,11 @@ bool numeric::info(unsigned inf) const
        return false;
 }
 
+bool numeric::is_polynomial(const ex & var) const
+{
+       return true;
+}
+
 int numeric::degree(const ex & s) const
 {
        return 0;
@@ -931,10 +936,10 @@ const numeric numeric::inverse() const
  *  ignored because the step function is generally considered real but
  *  a numeric may develop a small imaginary part due to rounding errors.
  */
-int numeric::step() const
+numeric numeric::step() const
 {      cln::cl_R r = cln::realpart(value);
        if(cln::zerop(r))
-               return 1;
+               return numeric(1,2);
        if(cln::plusp(r))
                return 1;
        return 0;