Skip to content

Commit f52df1c

Browse files
committed
Investigate small-arg logic as in issue
1 parent c68d746 commit f52df1c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

include/boost/math/special_functions/detail/bessel_jn.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ BOOST_MATH_GPU_ENABLED T bessel_jn(int n, T x, const Policy& pol)
8484
current = value;
8585
}
8686
}
87-
else if((x < 1) || (n > x * x / 4) || (x < 5))
87+
else if((x < 1) || ((n > x * x / 4) && (x < 5)))
8888
{
8989
return factor * bessel_j_small_z_series(T(n), x, pol);
9090
}

include/boost/math/special_functions/detail/bessel_jy.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ namespace boost { namespace math {
327327
// x is positive until reflection
328328
W = T(2) / (x * pi<T>()); // Wronskian
329329
T Yv_scale = 1;
330-
if(((kind & need_y) == 0) && ((x < 1) || (v > x * x / 4) || (x < 5)))
330+
if(((kind & need_y) == 0) && ((x < 1) || ((v > x * x / 4) && (x < 5))))
331331
{
332332
//
333333
// This series will actually converge rapidly for all small

0 commit comments

Comments
 (0)