45 double xa, xb, xm, x_b;
48 long s_fa, s_fb, s_fm;
75 f_bdd = 1000 * fabs(fa);
76 xm = xa - fa * (xa - xb) / (fa - fb);
83 else if (s_fm != s_fa) {
92 xm = xa - fa * (xa - xb) / (fa - fb);
96 }
while (f_abs > _zero && f_abs < f_bdd);
103 return (
zeroInterp(fn, value, x_b, x_f, dx, _zero));
double zeroInterp(double(*fn)(), double value, double x_i, double x_f, double dx, double _zero)
Finds the zero of a function within a specified interval using successive interpolation.