On 7/9/07, Raymond Toy <raymond.toy at ericsson.com> wrote:
> It could be due to some changes I made some time ago to the function tms
> and friends to tell maxima to simplify expressions of the form a*a^n to
> a^(n+1), where a is a number. The code is rather tricky so I could very
> well have made a mistake there.
I looked at the code for TMS in src/simp.lisp and I don't think
there is an error, rather just a case which could be handled and is not.
1 - 2 * 2^n => 1 - 2^(n + 1) because the subtraction is represented
as 1 + (- 1) * (2 * 2^n), while - 2 * 2^n does not simplify
because it is (- 2) * 2^n. I guess the sign difference keeps TMS
from seeing that the - 2 can be combined with 2^n.
I tried to see how to modify TMS to handle the case of differing
signs, but I don't see it.
best
Robert