A bug?



On 2/22/08, David Ronis <ronis at ronispc.chem.mcgill.ca> wrote:

> The following generates an error:
>  phi(i,l,m,mu):= A[i,l,m]*%e^((l+1/2)*mu)+B[i,l,m]*%e^(-(l+1/2)*mu);
>
>  ans:[ phi(0,l,m,mu[0])-phi(1,l,m,mu[0])=0,
>       phi(1,l,m,mu[1])-phi(2,l,m,mu[1])=0,
>       phi(2,l,m,-mu[2])-phi(3,l,m,-mu[2])=0  ]$
>
>  for i:0 thru 2 step 1 do
>   ap[i]:diff(ans,B[i,l,m]),
>   am[i]:diff(ans,A[i,l,m]),
>   for j:0 thru 2 step 1 do
>       aap[j,i]:part(ap[i],j+1,2),
>       aam[j,i]:part(am[i],j+1,2);

Expressions in the body of a loop must be explicitly grouped,
by (...) or block(...), e.g.

for j:0 thru 2 step 1 do
 (aap[j,i]:part(ap[i],j+1,2),
  aam[j,i]:part(am[i],j+1,2));

Maybe that's the problem here.

Robert