Hello, I am running gcc 14.2.1 (gcc 7 and 13 behaves consistently) and boost 1.87.
I've found that the following code returns nan when compiled with -O3 -funsafe-math-optimizations:
using value_type = double;
value_type x = 0x1.0p64;
using namespace boost::math;
std::cerr << cyl_bessel_j(0, x) << std::endl;
std::cerr << cyl_bessel_j(1, x) << std::endl;
std::cerr << cyl_bessel_j(2, x) << std::endl;
When I use clang with the same arguments, the result seems to be correct.