Expand does not expands?

Christian Bauer cbauer at student.physik.uni-mainz.de
Mon May 28 14:19:35 CEST 2001


On Mon, May 28, 2001 at 01:51:51PM +0200, zellerin at winbase.software602.cz wrote:
> 3*(-1+x^2+y^2)*y^2-3*x^2+3*x^4-3*(-1+x^2+y^2)*x^2-3*y^4+3*y^2 = 0
> I would say that the polynomial on the left side is not expanded, in spite of
> the fact that it should be result of an expand. Anyone give me a hint what I
> am doing/expecting wrong?

You are calling normal() after expand() and normal() is not guaranteed to
return an expanded numerator. Specifically, it is not expanded because
there's a square root in it ((x^2+y^2-1)^1/2) that is treated as a single
object by normal(). You have to call expand() after normal() if you want
an expanded result. Also, the operation of normal should not depend on
whether or not its input expression is expanded (it may only affect its
runtime and the expanded-ness of the result).


  / Coding on PowerPC and proud of it
\/ http://www.uni-mainz.de/~bauec002/
To UNSUBSCRIBE, email to ginac-list at ginac.de with a subject of "unsubscribe".

More information about the GiNaC-list mailing list