[GiNaC-devel] Re: [GiNaC-list] pseries patch

Sheplyakov Alexei varg at theor.jinr.ru
Mon Feb 12 15:06:35 CET 2007


Dear Vladimir,

On Mon, Feb 12, 2007 at 10:06:21AM +0000, Vladimir Kisil wrote:
>   Yes, this is better, but
> 
>   ASh> + if (eb.info(rational_function))
> 
>  should it be like that:
> 
> + if (eb.info(info_flags::rational_function))

Sure.


diff --git a/ginac/pseries.cpp b/ginac/pseries.cpp
index db7cef3..be2a7cf 100644
--- a/ginac/pseries.cpp
+++ b/ginac/pseries.cpp
@@ -1072,7 +1072,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 {


Best regards,
 Alexei

-- 
All science is either physics or stamp collecting.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
Url : http://www.cebix.net/pipermail/ginac-devel/attachments/20070212/a4b57339/attachment.pgp


More information about the GiNaC-devel mailing list