Boost C++ Libraries: Ticket #12961: boost::math::cyl_bessel_i crashes program. https://svn.boost.org/trac10/ticket/12961 <p> When trying to compute boost::math::cyl_bessel_i(0.2, 0.014), the program crashes with numerical overflow error. The expected value should be 0.404. Using some other values as argument can produce crash-free program. </p> <p> The crash happens with gcc 6.3.1 and clang 3.9.1. Attached is a sample code that crashes during run-time. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12961 Trac 1.4.3 theivorytower@… Wed, 12 Apr 2017 05:07:26 GMT attachment set https://svn.boost.org/trac10/ticket/12961 https://svn.boost.org/trac10/ticket/12961 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">bessel.cpp</span> </li> </ul> <p> Sample code that crashes. </p> Ticket John Maddock Thu, 13 Apr 2017 09:50:30 GMT <link>https://svn.boost.org/trac10/ticket/12961#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12961#comment:1</guid> <description> <p> I'm unable to reproduce this, either on Windows (MSVC) or on Ubuntu Linux with GCC. </p> <p> What's the OS? </p> <p> You can help me a little by stepping through your sample program in the debugger - you should get to: </p> <p> bessel.hpp:221 return bessel_i_small_z_series(v, x, pol); </p> <p> And then stepping into that should lead to the rather trivial evaluation in: </p> <p> bessel_ik.hpp:78 return prefix * result; </p> <p> With </p> <p> prefix = 0.40373565439688797 and result = 1.0000408337880704 </p> </description> <category>Ticket</category> </item> <item> <author>theivorytower@…</author> <pubDate>Thu, 13 Apr 2017 17:03:40 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12961#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12961#comment:2</guid> <description> <p> Thanks for the reply. I'm using Arch Linux. </p> <p> When I get to bessel_ik.hpp:78 return prefix * result, the variables are prefix = inf and result = 1.000040833788070502945698192487356. </p> <p> When I step in a little further, I find the reason prefix was evaluated to be infinite was because pow(x / 2, v) was evaluated to be infinite! So this is must be a bug with libstdc++. Sorry this is not a bug with boost. FYI with my libstdc++ I find std::pow(x, y) ALWAYS returns infinite whenever y is long double. I will dig further into libstdc++... </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sat, 15 Apr 2017 11:20:06 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12961#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12961#comment:3</guid> <description> <p> As a workaround you could define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS which would disable all use of the long double std lib functions internally. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Tue, 31 Jul 2018 17:39:20 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12961#comment:4 https://svn.boost.org/trac10/ticket/12961#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> Ticket