1-d roots (error handling)

Brian Gough brian.gough@network-theory.co.uk
Wed Jan 1 20:57:00 GMT 2003


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.



More information about the Gsl-discuss mailing list