possible bug in monomial expressions



-----maxima-bounces at math.utexas.edu wrote: -----

>To: "maxima at math.utexas.edu" <maxima at math.utexas.edu>
>From: "S. Newhouse" <sen1 at math.msu.edu>
>Sent by: maxima-bounces at math.utexas.edu
>Date: 12/20/2007 11:30AM
>Subject: possible bug in monomial expressions
>
>Hello,
> Look at the following:
>
>(%i103) p: 2*x*y;
>(%o103)                              2 x y
>(%i104) length(p);
>(%o104)                                3
>(%i105) q: -2*x*y;
>(%o105)                             - 2 x y
>(%i106) length(q);
>(%o106)                                1
>
>Is this a bug?  If so, what is the correct answer to length in these
>problems?

No, this is not a bug. Consider:

(%i36) length(-2*x*y), inflag : false;
(%o36) 1

(%i37) length(-2*x*y), inflag : true;
(%o37) 3

I think the user documentation for length is reasonable clear.

Barton