Modify ↓

# Ticket #6367 (closed Bugs: fixed)

## 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

Reported by: | t.hisch@… | Owned by: | johnmaddock |
---|---|---|---|

Milestone: | To Be Determined | Component: | math |

Version: | Boost 1.48.0 | Severity: | Problem |

Keywords: | Cc: |

### Description

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; }

## Attachments

## Change History

**Note:**See TracTickets for help on using tickets.

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"