[GiNaC-list] Not factoring expression
james.jackson at cern.ch
Mon Feb 16 20:08:41 CET 2009
Ah excellent, normal() has performed the cancellation.
On 16 Feb 2009, at 17:17, Richard B. Kreckel wrote:
> James Jackson wrote:
>> 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:
>> 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?
> The linear solvers don't cancel common factors in numerator and
> denominator. You have to explicitly call normal() on the result in
> order to do that.
> Richard B. Kreckel
> GiNaC-list mailing list
> GiNaC-list at ginac.de
More information about the GiNaC-list