PreviousIndexNext

[help-gsl] Re: Underflow in gsl_sf_bessel_Jn_array (2008-07-18)

From: Brian Gough <bjg@gnu.org>
Subject: Re: Underflow in gsl_sf_bessel_Jn_array
Date: Fri, 18 Jul 2008 07:41:39 +0100
To: Jonny Taylor <j.m.taylor@............>
Cc: help-gsl@gnu.org

At Wed, 16 Jul 2008 13:42:44 +0100,
Jonny Taylor wrote:
>
> Please can somebody advise on using gsl_sf_bessel_Jn_array for small z?
>
> I need to generate Bessel functions up to some n_max (of order 50) for
> arbitrary z. I run into problems for small z because the function uses
> a downward recurrence to populate the array, and suffers underflow for
> large n.

Could you send a small example program showing the problem to
bug-gsl@gnu.org for reference. Thanks.

> Can anybody suggest a better strategy to take? It seems like this
> should be a relatively simple thing to ask, but I can't come up with a
> simple way of achieving it...

It may be possible to modify gsl_sf_bessel_Jn_array to use a scale
factor in the recurrence to avoid underflow.

--
Brian Gough

GNU Scientific Library -
http://www.gnu.org/software/gsl/