From cbaf7486e52755893162d7cbc9153789c8ed4251 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 3 Mar 2013 16:32:30 +0000 Subject: [PATCH] Fixes #8116. [SVN r83283] --- include/boost/math/tools/toms748_solve.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);