-----Message d'origine-----
De : Richard Fateman
> > laurent couraud wrote:
> > Hi
> >
> > (%i1) rest(x^2);
> > Wrong number of arguments to "^"
> > -- an error. Quitting. To debug this try DEBUGMODE(TRUE);
> > (%i2)
> The message can be explained by observing that the internal
> form of x^2 is [simplifying it somewhat...] the lisp
> list (^ x 2).
> the way the macsyma REST function works, it produces the
> list (^ 2) which is then simplified. The simplifier
> notices the invalid form and this prompts the error message.
> If you want to extract 2, try part(%,2).
Yes, this is what i want and what i do.
I can do also :
second(x^2);
But the reason for what i send this message is that if i do :
rest(a+b);
this give a. OK +a is simplified to a
but rest(a*b) give b and not error message like for "^" and "/" operator.
Laurent