Skip to content

Commit

Permalink
Correct assert usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzmaddock committed Jan 26, 2024
1 parent 7977144 commit 14eee37
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/boost/math/special_functions/detail/bessel_ik.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ int bessel_ik(T v, T x, T* result_I, T* result_K, int kind, const Policy& pol)
BOOST_MATH_INSTRUMENT_VARIABLE(n);
BOOST_MATH_INSTRUMENT_VARIABLE(u);

BOOST_ASSERT(x > 0); // Error handling for x <= 0 handled in cyl_bessel_i and cyl_bessel_k
BOOST_MATH_ASSERT(x > 0); // Error handling for x <= 0 handled in cyl_bessel_i and cyl_bessel_k

// x is positive until reflection
W = 1 / x; // Wronskian
Expand Down
2 changes: 1 addition & 1 deletion include/boost/math/special_functions/detail/bessel_j0.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ T bessel_j0(T x)
using namespace boost::math::tools;
using namespace boost::math::constants;

BOOST_ASSERT(x >= 0); // reflection handled elsewhere.
BOOST_MATH_ASSERT(x >= 0); // reflection handled elsewhere.

if (x == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion include/boost/math/special_functions/detail/bessel_j1.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ T bessel_j1(T x)
value = factor * (rc * (sx - cx) + y * rs * (sx + cx));
}

BOOST_ASSERT(x >= 0); // Negative values handled by the caller.
BOOST_MATH_ASSERT(x >= 0); // Negative values handled by the caller.

return value;
}
Expand Down

0 comments on commit 14eee37

Please sign in to comment.