mirror of
https://github.com/boostorg/math.git
synced 2026-02-26 04:42:22 +00:00
correct fix
This commit is contained in:
@@ -327,6 +327,11 @@ int bessel_ik(T v, T x, T* result_I, T* result_K, int kind, const Policy& pol)
|
||||
T scale = 1;
|
||||
T scale_sign = 1;
|
||||
|
||||
n = iround(v, pol);
|
||||
u = v - n; // -1/2 <= u < 1/2
|
||||
BOOST_MATH_INSTRUMENT_VARIABLE(n);
|
||||
BOOST_MATH_INSTRUMENT_VARIABLE(u);
|
||||
|
||||
if (((kind & need_i) == 0) && (fabs(4 * v * v - 25) / (8 * x) < tools::forth_root_epsilon<T>()))
|
||||
{
|
||||
// A&S 9.7.2
|
||||
@@ -338,11 +343,6 @@ int bessel_ik(T v, T x, T* result_I, T* result_K, int kind, const Policy& pol)
|
||||
}
|
||||
else
|
||||
{
|
||||
n = iround(v, pol);
|
||||
u = v - n; // -1/2 <= u < 1/2
|
||||
BOOST_MATH_INSTRUMENT_VARIABLE(n);
|
||||
BOOST_MATH_INSTRUMENT_VARIABLE(u);
|
||||
|
||||
BOOST_MATH_ASSERT(x > 0); // Error handling for x <= 0 handled in cyl_bessel_i and cyl_bessel_k
|
||||
|
||||
// x is positive until reflection
|
||||
|
||||
Reference in New Issue
Block a user