A regression in Maxima 5.17.1 with limits and assumptions?



>>>>> "Michael" == Michael Abshoff <michael.abshoff at googlemail.com> writes:

    Michael> Hi,
    Michael> I noticed the following:

    Michael> Maxima 5.16.3 http://maxima.sourceforge.net
    Michael> (%i1) limit(a*sin(x)/x, x,0);
    Michael> (%o1)                                  a


    Michael> In contrast 5.17.1:

    Michael> Maxima 5.17.1 http://maxima.sourceforge.net
    Michael> (%i1) limit(a*sin(x)/x, x,0);
    Michael> Is  a  positive, negative, or zero?

    Michael> positive;
    Michael> (%o1)                                  a


Hmm.  I guess the method used to compute this limit has changed in
5.17.  In 5.17, the method eventually calls BEHAVIOR, and it appears
that this part of the code is responsible for the question:

	      ((and (mtimesp exp)
		    (prog2 (setq pair (partition exp var 1))
			(not (mtimesp (cdr pair)))))
	       (setq sign (getsignl (car pair)))
	       (if (not (fixnump sign))
		   0
		   (* sign (behavior (cdr pair) var val))))

I think PARTITION splits EXP into parts, the first which is
independent of VAR.  So I don't know why we need to compute the sign
of that.

    Michael> (%i2) forget();
    Michael> (%o2)                                 []
    Michael> (%i3) limit(a*sin(x)/x, x,0);
    Michael> Is  a  positive, negative, or zero?

    Michael> zero;
    Michael> (%o3)                                  a

    Michael> Since I just told Maxima that a equals zero shouldn't it take that into 
    Michael> consideration?

Maxima doesn't normally remember your responses to these questions.
(I kind of like it this way.  It makes exploration easier.)

    Michael> And also:

    Michael> (%i4) forget();
    Michael> (%o4)                                 []
    Michael> (%i5) limit(a*sin(x)/x, x,0);
    Michael> Is  a  positive, negative, or zero?

    Michael> Now press CTRL-D and the question is repeated infinitely:

    Michael> (%i5) limit(a*sin(x)/x, x,0);
    Michael> Is  a  positive, negative, or zero?

That appears to be an issue with Clisp.  In CMUCL, it just prints out
the prompt again.  Gcl does something similar.

My guess is that Ctrl-D in clisp closes the stream that we're reading
from and maxima doesn't notice that the stream has been closed and
keeps asking.  If so, maxima should do something better than that.

Ray