https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119143
Bug ID: 119143 Summary: std::cyl_bessel_j incorrect result Product: gcc Version: 14.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: matwey.kornilov at gmail dot com Target Milestone: --- Hello, I am running gcc-c++ 14.2.1 with libstdc++ and I've found that the following code works incorrectly: #include <iostream> #include <cmath> #include <limits> int main(int argc, char** argv) { std::cout << std::cyl_bessel_j(0, std::numeric_limits<double>::infinity()) << std::endl; return 0; } I see -nan while I supposed to see 0. Note, that the similar issue has recently been fixed in Boost.math (https://github.com/boostorg/math/commit/dfc29348653bbc976c9941a9fbc9f49d68cb954e).