help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Underflow in gsl_sf_bessel_Jn_array


From: Brian Gough
Subject: Re: [Help-gsl] Underflow in gsl_sf_bessel_Jn_array
Date: Wed, 23 Jul 2008 08:08:23 +0100
User-agent: Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI)

At Fri, 18 Jul 2008 12:14:10 +0100,
Jonny Taylor wrote:
> The following is sufficient to demonstrate the issue.
>       double besselArray[51];
>       double rho = 1e-6;
>       gsl_sf_bessel_Jn_array(0, 50, rho, besselArray);
> 
> The problem is that the array is populated by downward recurrence, but  
> J_51 and J_50 are way smaller than DBL_MIN, resulting in an error  
> within the GSL library:
> gsl: gamma.c:1454: ERROR: underflow
> Default GSL error handler invoked.

I looked at the code and there's no easy way to add support for
scaling the results in GSL itself at the moment.  I would recommend
that you make an estimate of n_max using the asymptotic formula for Jn.

-- 
Brian Gough

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]