Re: Handling branch cuts for hypergeometric function s



>>>>> "Viktor" == Viktor T Toth  writes:

    Viktor> Anyway, I realized that, to a certain extent anyway, I was
    Viktor> banging on open doors. (That's what I get for jumping in
    Viktor> on a discussion without doing my homework first.) That is
    Viktor> because it is already quite possible to override functions
    Viktor> like asksign1 or ask-integer and alter the behavior of
    Viktor> programs that rely on them. For example, if I wanted an
    Viktor> error return instead of an interactive query, I could do
    Viktor> something like this:


[snip]

    MAXIMA> (defun ask-integer (exp even-odd) (merror "Don't know if ~M is
    Viktor> integer" exp))
    Viktor> ASK-INTEGER
    MAXIMA> (to-maxima)
    Viktor> Returning to Maxima
    Viktor> (%o3)                                true
    Viktor> (%i4) integrate(x**a/(x+1)**(5/2), x, 0, inf);

    Viktor>               2 (a + 1)
    Viktor> Don't know if --------- is integer
    Viktor>                   5
    Viktor>  -- an error.  Quitting.  To debug this try debugmode(true);

This, I think is a very bad idea because now you've changed the
behavior for every routine in maxima.  

Using catch/throw or conditions allows the dynamic behaviour that we
would want.  By default, let's say, a condition is signaled to ask for
an answer.  Your program can catch and signal an error.  You don't
break other routines by doing so.  

This might still have some problems but I think there will be far
fewer than when you globally change ask-integer and friends.

We need to decide on some policy.  Don't know what that would be,
though. 

Ray