From d0b3e67ddbbe031fefbe3e88e8bf8860424d0d4b Mon Sep 17 00:00:00 2001 From: Chris Dams Date: Tue, 13 Feb 2007 15:14:14 +0000 Subject: [PATCH] Make series expansion work with non-rational functions. Patch by Alexei. --- ginac/pseries.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ginac/pseries.cpp b/ginac/pseries.cpp index 0e1f1833..1e61e0ae 100644 --- a/ginac/pseries.cpp +++ b/ginac/pseries.cpp @@ -1100,7 +1100,10 @@ ex power::series(const relational & r, int order, unsigned options) const } const ex& sym = r.lhs(); // find existing minimal degree - int real_ldegree = basis.expand().ldegree(sym-r.rhs()); + ex eb = basis.expand(); + int real_ldegree = 0; + if (eb.info(info_flags::rational_function)) + real_ldegree = eb.ldegree(sym-r.rhs()); if (real_ldegree == 0) { int orderloop = 0; do { -- 2.44.0