32 static double guess_h(
double initial_h,
double x) {
33 volatile double xh = x + initial_h;
34 volatile double h = xh - x;
54 double ymh = f(x - h);
56 double yph = f(x + h);
58 return (yph - 2 * y + ymh) / (h * h);
double derivative2nd(const Function &f, const double x)
Interface class representing a function with an arbitrary number of parameters.
static double guess_h(double initial_h, double x)
double derivative(const Function &f, const double x)