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: Liam Healy
Subject: Re: [Help-gsl] Underflow in gsl_sf_bessel_Jn_array
Date: Thu, 17 Jul 2008 19:00:42 -0400

I'm not sure what you mean by "suffers underflow" -- do you get an error?
If so, you might look into gsl_ieee_env_setup () and mask-underflow.

Liam

On Wed, Jul 16, 2008 at 8:42 AM, Jonny Taylor <address@hidden> 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.
>
> It is not a problem for me if underflow occurs at high n: I am computing a
> sum, and if underflow occurs for some n then that will definitely not affect
> the overall result.
>
> What I presume I need to do is to determine what n (<= n_max) I need to pass
> to gsl_sf_bessel_Jn_array in order to avoid underflow. Unfortunately that
> doesn't seem to be trivial to compute (which is not really surprising). The
> best strategies I can come up to are to use a lookup which gives the minimum
> z which works for a given cutoff n, or to just try calling
> gsl_sf_bessel_Jn_e for some trial n and then reducing n if I get an error.
> That is not ideal, though, as I'll need to install an error handler and I
> want to do this in threaded code.
>
> 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...
>
> Thanks
> Jonny
>
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>




reply via email to

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