[GiNaC-list] Not factoring expression
James Jackson
james.jackson at cern.ch
Mon Feb 16 17:05:33 CET 2009
Hi,
I've just started using GiNaC (and very nice it is too!), however I
have some strange behavior with an expression not being simplified.
One output of a linear equation solver is the expression:
(C_2
*s
^
2
*L_2
*V_1
+
C_2
*L_1
*C_1
*s
^
4
*L_2
*V_1
+
L_1
*C_1
*s
^
2
*V_1
+
V_1
)*(1
+L_1*C_1*s^2+C_2*L_1*s^2+C_2*L_1*C_1*s^4*L_2+C_2*s^2*L_2)^(-1)*V_1^(-1)
What is happening is that the V_1 terms in the first bracket are not
being factorised, and therefore no cancellation with the final
(V_1)^(-1) term is occuring. All my symbols are created with a
SymbolFactory pattern, so I can be sure each V_1 is the same object.
Can anyone suggest why GiNaC isn't simplifying this to cancel the V_1
terms?
Regards,
James.
More information about the GiNaC-list
mailing list