]> www.ginac.de Git - ginac.git/commitdiff
Synced to HEAD
authorJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 9 Aug 2004 18:32:56 +0000 (18:32 +0000)
committerJens Vollinga <vollinga@thep.physik.uni-mainz.de>
Mon, 9 Aug 2004 18:32:56 +0000 (18:32 +0000)
ginac/pseries.cpp

index 443969c1d766176d6a330cd60c481332f84bfd9a..993eacf119f7583903747f2a92577f59fa508841 100644 (file)
@@ -971,7 +971,12 @@ ex power::series(const relational & r, int order, unsigned options) const
 
        // No, expand basis into series
 
 
        // No, expand basis into series
 
-       numeric numexp = ex_to<numeric>(exponent);
+       numeric numexp;
+       if (is_a<numeric>(exponent)) {
+               numexp = ex_to<numeric>(exponent);
+       } else {
+               numexp = 0;
+       }
        const ex& sym = r.lhs();
        // find existing minimal degree
        int real_ldegree = basis.expand().ldegree(sym-r.rhs());
        const ex& sym = r.lhs();
        // find existing minimal degree
        int real_ldegree = basis.expand().ldegree(sym-r.rhs());