Skip to content

Commit

Permalink
Merge pull request #6387 from jyoo1042/abcd
Browse files Browse the repository at this point in the history
Change the error condition for bounds on TOMS748
  • Loading branch information
wthrowe authored Dec 3, 2024
2 parents 98eb769 + 38eb651 commit 881ac83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NumericalAlgorithms/RootFinding/TOMS748.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, const T& fax,
size_t& max_iter) {
// Main entry point and logic for Toms Algorithm 748
// root finder.
if (UNLIKELY(simd::any(ax >= bx))) {
if (UNLIKELY(simd::any(ax > bx))) {
throw std::domain_error("Lower bound is larger than upper bound");
}

Expand Down

0 comments on commit 881ac83

Please sign in to comment.