This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: 1-d roots (error handling)
- From: Brian Gough <brian dot gough at network-theory dot co dot uk>
- To: "Peter S. Christopher" <peterc at midway dot uchicago dot edu>
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Wed, 1 Jan 2003 20:53:58 +0000
- Subject: Re: 1-d roots (error handling)
- References: <Pine.GSO.4.21.0212301026230.27039-100000@harper.uchicago.edu>
Peter S. Christopher writes:
> I'm using brents algorithm to find one dimensional roots,
> although I don't think my question is restricted to brents algo. In
> the multi-root package, the user defined function can return
> GSL_FAILURE to indicate to the solver that a critical error has
> occurred. Then the solver returns an appropriate error code. Can
> this be done with the one-d root algorithms? The current interface
> has the 1-d user defined function returning a double; if I return
> GSL_NAN from my user defined will the the solver handle that like a
> critical error? Should it handle this like a critical error?
If the function returns a NaN/Inf it should lead to an error code of
GSL_EBADFUNC. If it doesn't please send a bug report (either for the
code or documentation). Thanks.