This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gsl_root_test_residual(double f, double epsabs)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]