This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
gsl_root_test_residual(double f, double epsabs)
- From: Karsten Howes <karsten at videotron dot ca>
- To: gsl-discuss at sources dot redhat dot com
- Date: Fri, 03 Sep 2004 09:42:19 -0400
- Subject: gsl_root_test_residual(double f, double epsabs)
- References: <40C3AF75.7080904@yahoo.es> <40C4229F.3070907@yahoo.es>
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