Asksign quick and dirty



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

>  What if every time Maxima wanted to ask a question (in asksign, ask-evod,
> ask-integer, etc.), we declare that the global result to the original
> request is an object defining what additional information is needed.  If the
> client is smart, it can then assert that information and try again (at the
> cost of repeating parts of the calculation of course).

I've tried that, with some success. Although the code as stands is
susceptible to stack overflows, maybe from failing to catch something,
or maybe from weaknesses in the assume system -- asking a series
of redundant queries or something like that.
http://maxima.sourceforge.net/wiki/index.php/Noninteractive%20mode

When I mumble something about working more on this problem,
it's this code that I mean.

> I know it's a bit hokey, but a) it preserves the request/reply system b)
> it's not so bad for machine use (terrible for human use, of course).

Disagreed about (b) here -- even in interactive mode, a record of the
asksign query could be carried forward with the result.

>  integrate(x^a,x,1/k,k) =>
>       assuming( a>0 and (k-1)*k*(k+1) > 0, k^(a+1)/(a+1)-k^(-a-1)/(a+1) )

We can use if or 'if here; no need for a new construct.

Robert