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/