[Boost-bugs] [Boost C++ Libraries] #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

Subject: [Boost-bugs] [Boost C++ Libraries] #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
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-08 09:42:15


#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
-------------------------------+--------------------------------------------
 Reporter: t.hisch@… | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: math
  Version: Boost 1.48.0 | Severity: Problem
 Keywords: |
-------------------------------+--------------------------------------------
 This simple code works with boost 1.47 but generates an overflow error
 with boost 1:47 when compiled with gcc-4.1.2

 ./a.out
 terminate called after throwing an instance of
 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<std::overflow_error>
>'
   what(): Error in function boost::math::bessel_yn<e>(e,e): Overflow
 Error
 cyl_hankel1: -25 8 Aborted

 {{{
 #include <boost/math/special_functions.hpp>

 // Define outgoing Hankel 1 function and its derivative
 template <class T1, class T2>
 inline typename std::complex<double> cyl_hankel1(T1 v, T2 x)
 {
     using namespace boost::math::policies;
     using namespace boost::math;

     return std::complex<double>(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 << "cyl_hankel1: " << nft_ << " " << k*r << " ";
     cout << abs(imag(cyl_hankel1(nft_,k*r))) << endl;
     return 0;
   }
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6367>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC