diff --git a/include/boost/math/tools/toms748_solve.hpp b/include/boost/math/tools/toms748_solve.hpp index f0c42324e..1310ff29a 100644 --- a/include/boost/math/tools/toms748_solve.hpp +++ b/include/boost/math/tools/toms748_solve.hpp @@ -197,7 +197,7 @@ T quadratic_interpolate(const T& a, const T& b, T const& d, T A = safe_div(T(fd - fb), T(d - b), tools::max_value()); A = safe_div(T(A - B), T(d - a), T(0)); - if(a == 0) + if(A == 0) { // failure to determine coefficients, try a secant step: return secant_interpolate(a, b, fa, fb);