Skip to content

Commit d7ab3a9

Browse files
committed
tanh_sinh: trivial correction of if..else logic.
Without this we can take 2 of the branches when z < -0.5 and not make correct use of zc triggering the assertion later. [CI SKIP]
1 parent b1c03c8 commit d7ab3a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/math/quadrature/tanh_sinh.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ auto tanh_sinh<Real, Policy>::integrate(const F f, Real a, Real b, Real toleranc
185185
return f(diff * (avg_over_diff_m1 - zc));
186186
position = a - diff * zc;
187187
}
188-
if (z > 0.5)
188+
else if (z > 0.5)
189189
{
190190
if(have_small_right)
191191
return f(diff * (avg_over_diff_p1 - zc));

0 commit comments

Comments
 (0)