gsl_root_test_residual(double f, double epsabs)
Karsten Howes
karsten@videotron.ca
Fri Sep 3 13:40:00 GMT 2004
Hi,
I am working with the 1D root finder framework and I am trying to figure
out how to get the value of my function at the current best root estimate
(without re-evaluating my function of course). I need it because I want
to stop when the function is sufficiently close to zero and I dont
actually care about the exact location of the root. The information does
not appear to be in the solver state:
typedef struct
{
const gsl_root_fsolver_type * type;
gsl_function * function ;
double root ;
double x_lower;
double x_upper;
void *state;
}
gsl_root_fsolver;
How do I use the function gsl_root_test_residual?
If it doesn't work, one possibility is for me to maintain a map x->f for
all previous valuations of f and then just look up f in the map using the
current best root. Sorry if I'm missing something obvious.
Thanks for a great library Brian et al.
Best regards,
Karsten
More information about the Gsl-discuss
mailing list