Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix CI errors: division by zero and array include
  • Loading branch information
ryanelandt committed Jul 12, 2023
commit 90582fc9c5f5d71cd06cc3a96441c1994c431592
8 changes: 4 additions & 4 deletions include/boost/math/tools/roots.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#endif
#include <boost/math/tools/complex.hpp> // test for multiprecision types in complex Newton

#include <array>
#include <utility>
#include <cmath>
#include <tuple>
Expand Down Expand Up @@ -525,10 +526,9 @@ namespace detail {
StepSizeHistory() { reset(); }

void reset() {
// NOTE: for T = boost::math::concepts::real_concept, the following evaluate to 0:
// std::numeric_limits<T>::infinity() and std::numeric_limits<T>::infinity()
dx_p_ = static_cast<T>(1) / 0;
dx_pp_ = static_cast<T>(1) / 0;
// Need to static cast double infinity because for T = boost::math::concepts::real_concept,
// std::numeric_limits<T>::infinity() evaluates to 0.
dx_p_ = dx_pp_ = static_cast<T>(std::numeric_limits<double>::infinity());
}

void push(T input) {
Expand Down