If I run formula.diff(a, 1):
[0.5*(t-ax^3)^2]' => -(t-a*x^3)*x^3
[0.5*(ax^3-t)^2]' => (a*x^3-t)*x^3
On my code I parse the formula (0.5)*(t -(formula)^2 and substitute formula with
another formula. I do not understand why the minus sign is not interpreted correctly.
I think GiNaC does create a pattern matching and not evaluate the correct expression.
In my opinion the first expression is the correct one, GiNaC creates the second. Why?
How can I tell GiNaC that it interpret the expression arithmetically correct?
Thanks
Phil