ratsubst and exp



BTW, I'm not sure I understand what ratsubst is supposed to do here...

ratsubst(z,x,%e^x) => %e^z  OK
ratsubst(z,x-y,x-y) => z   OK
ratsubst(z,x-y,%e^(x-y)) => %e^(x-y)  ???

ratsubst(z,x+y,x-y) => 2*x-z   OK
ratsubst(z,x-y,x+y) => 2*x-z  OK
ratsubst(z,%e^(x-y),%e^(x+y)) => %e^(2*y)*z  OK
ratsubst(z,%e^(x+y),%e^(x-y)) => %e^(x-y)   ???

ratsubst( z,x-y,x+y) => 2*x-z  OK
ratsubst( z,x-y,f(x+y)) => f(2*x-z)  OK
ratsubst( z,x-y,%e^(x+y)) => %e^(x+y)  ???

On 9/6/07, Richard Fateman <fateman at cs.berkeley.edu> wrote:
> Try ratsubst(z,exp(x-y),%);
>     subst(exp(x-y),z,%);