Boost C++ Libraries: Ticket #6367: new 'Added new series evaluation methods to the cyclic Bessel I, J, K and Y functions'-code leads to overflow errors with gcc 4.1.2 https://svn.boost.org/trac10/ticket/6367 <p> This simple code works with boost 1.47 but generates an overflow error with boost 1:47 when compiled with gcc-4.1.2 </p> <p> ./a.out terminate called after throwing an instance of 'boost::exception_detail::clone_impl&lt;boost::exception_detail::error_info_injector&lt;std::overflow_error&gt; &gt;' </p> <blockquote> <p> what(): Error in function boost::math::bessel_yn&lt;e&gt;(e,e): Overflow Error </p> </blockquote> <p> cyl_hankel1: -25 8 Aborted </p> <pre class="wiki">#include &lt;boost/math/special_functions.hpp&gt; // Define outgoing Hankel 1 function and its derivative template &lt;class T1, class T2&gt; inline typename std::complex&lt;double&gt; cyl_hankel1(T1 v, T2 x) { using namespace boost::math::policies; using namespace boost::math; return std::complex&lt;double&gt;(boost::math::cyl_bessel_j(v, x), boost::math::cyl_neumann(v, x)); } int main(void){ using namespace std; double r=1.0; double k=8.0; int nft_ = -25; cout &lt;&lt; "cyl_hankel1: " &lt;&lt; nft_ &lt;&lt; " " &lt;&lt; k*r &lt;&lt; " "; cout &lt;&lt; abs(imag(cyl_hankel1(nft_,k*r))) &lt;&lt; endl; return 0; } </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6367 Trac 1.4.3 t.hisch@… Sun, 08 Jan 2012 09:44:48 GMT <link>https://svn.boost.org/trac10/ticket/6367#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6367#comment:1</guid> <description> <p> Sry for the Typo. It should be: "This simple code works with boost 1.47 but generates an overflow error with boost 1.48 when compiled with gcc-4.1.2" </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Sun, 08 Jan 2012 18:51:26 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6367#comment:2 https://svn.boost.org/trac10/ticket/6367#comment:2 <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">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76373" title="Correct overflow logic in Bessel Y and add new test case. Fixes #6367.">[76373]</a>) Correct overflow logic in Bessel Y and add new test case. Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6367" title="#6367: Bugs: new 'Added new series evaluation methods to the cyclic Bessel I, J, K ... (closed: fixed)">#6367</a>. </p> Ticket John Maddock Mon, 09 Jan 2012 12:18:30 GMT <link>https://svn.boost.org/trac10/ticket/6367#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6367#comment:3</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76377" title="Document Bessel function fix. Update TODO list. Regenerate docs. ...">[76377]</a>) Document Bessel function fix. Update TODO list. Regenerate docs. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6367" title="#6367: Bugs: new 'Added new series evaluation methods to the cyclic Bessel I, J, K ... (closed: fixed)">#6367</a>. </p> </description> <category>Ticket</category> </item> <item> <author>t.hisch@…</author> <pubDate>Mon, 09 Jan 2012 14:15:57 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6367#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6367#comment:4</guid> <description> <p> Thx, this seems to work! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>John Maddock</dc:creator> <pubDate>Fri, 13 Jan 2012 11:46:32 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/6367#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6367#comment:5</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/76445" title="Merge fix for #6367. Refs #6367.">[76445]</a>) Merge fix for <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6367" title="#6367: Bugs: new 'Added new series evaluation methods to the cyclic Bessel I, J, K ... (closed: fixed)">#6367</a>. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6367" title="#6367: Bugs: new 'Added new series evaluation methods to the cyclic Bessel I, J, K ... (closed: fixed)">#6367</a>. </p> </description> <category>Ticket</category> </item> </channel> </rss>