Am Samstag, den 13.03.2010, 11:58 -0700 schrieb Robert Dodier:
> On 3/13/10, Dieter Kaiser <drdieterkaiser at web.de> wrote:
>
> > I would like to suggest to replace the calls to a Lisp break in the
> > routines of taylor with a call to TAY-ERR.
> >
> > With this change taylor will no longer give a Lisp error when an
> > unhandled case occurs, but throws an error. A user gets a Maxima error.
> > When called from limit the error is catched and limit continues its
> > work.
> >
> > This is an example in the routine stronger-var?:
> >
> > (when (alike1 v1 v2) (break "stronger-var? called on equal vars"))
> >
> > This is a possible replacement:
> >
> > (when (alike1 v1 v2)
> > (tay-err
> > (intl:gettext "taylor: stronger-var? called on equal vars.")))
>
> Dieter, thanks for working on this problem.
> I agree that a Maxima error is preferable to a Lisp break.
> However, i hope we can print a message which indicates the origin
> of the problem more clearly to the user. Is (ALIKE1 V1 V2) the
> consequence of some incorrect or unintended or unhandled input
> on the part of the user? If so, we should try to state the error
> message in terms that the user understands.
Hello Robert,
I think most of the breaks are implemented because the algorithm can not
handle the case. Therefore, the breaks are not an error by the user, but
a weak point of the algorithm.
I do not know the algorithm in such a detail, that I can improve the
error messages considerable. But at first I think it the best to avoid
the Lisp breaks. This allows other code to continue, if taylor fails.
Dieter Kaiser