Can't escape from sign question loop



On 10/9/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:

>   ss(a,N):=(print([a,N,i]),sum(i^a,i,0,N));
>
> Now do
>
>   plot2d(ss(.5,i),[i,0,5]);
>
> Maxima repeatedly asks the sign of i, and control-G cannot escape from
> this.  I do understand that when N is a non-integer, the sum will
> return a noun form.  But that should be OK.

Stavros, there are various forms of strangeness here.

(1) sum(..., a, b) => noun expression when (b - a) is not an integer.
(plot2d tries to evaluate sum at various points in the interval [0, 5].)
Maybe that should be an error?

(2) The asksign is triggered by calling MAYBE-REALPART in
the function constructed by COERCE-FLOAT-FUN (called by
plot2d). Dunno if that's a bug but it's certainly annoying.
Maybe there should be a way to suppress asksign, which could
be enabled by plot2d before calling the constructed function.

(3) plot2d is very optimistic --- it keeps trying different values
in the range of the variable over which to plot, even if the
expression doesn't return a number. (It is a loop within plot2d
which causes all the asksign questions; it is not that Maxima
is stuck within asksign itself.) Maybe plot2d shouldn't try so hard.

(4) Ctrl-G doesn't seem to be understood by the Lisps which
I can test (GCL, Clisp, SBCL, and Allegro).
Maybe ctrl-C has the desired effect.

Hope this helps --

Robert