Boost logo

Boost Users :

Subject: [Boost-users] Boost_1_54_0: boost::math::sph_bessel(n, x) crash at x=0 n>0
From: JE Campagne (campagne_at_[hidden])
Date: 2013-10-17 05:39:56

Dear developpers,

I'am running Boost 1_54_0 on Scientific Linux slc-6.1, gcc-4.4.5, 64
bits machine.

I face a problem with computation of spherical bessel function, although
the problem seems well known here
is a test program

     int L;
     try {
       for(L=100;L<2010;L++) {
     boost::math::sph_bessel(L, 0.);
     } catch (std::exception& sex) {
       cout << "Error j_"<<L<<"(0): "<< sex.what() << endl;

And the output
Error j_1755(0): Error in function boost::math::tgamma<e>(e): Result of
tgamma is too large to represent.

which tends to point out that at L=1755 the spherical bessel function
get a problem once one ant to estimate at x=0.

Of course, I know that j0(0) = 1 and for L>0 jL(0) = 0 but 1) I'm using
a program which compute integral of product of bessel function
and sometimes it needs to call the function at 0. So I would expect the
BOOST library to be protected against that.

Am I wrong?

Best regards

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at