Bug in rest() function?



laurent couraud wrote:

>......
>  
>
>But the reason for what i send this message is that if i do :
>
>rest(a+b);
>
>this give a. 
>

The explanation is that  internally  p:  a+b+c+d  is    [essentially] 
the list  (+ d c b a)
and the way REST was programmed,  REST(p) gives  (+ c b a)

>OK +a is simplified to a
>but rest(a*b) give b and not error message like for "^" and "/" operator.
>

p: a*b*c*d   is   (* a b c d) , and so REST(p) gives (b*c*d).

The operators ^ and / have a fixed number of operands, and computing 
REST of these
expressions gives an error.

I think that the behavior of REST should be documented, but I do not see 
why it
should be changed to mean the same as SECOND.

RJF

>
>Laurent
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>  
>