help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] gsl_sf_bessel_il_scaled


From: Torquil Macdonald Sørensen
Subject: Re: [Help-gsl] gsl_sf_bessel_il_scaled
Date: Sat, 20 Nov 2010 23:22:57 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101030 Icedove/3.0.10

On 20/11/10 13:50, Brian Gough wrote:
At Tue, 16 Nov 2010 17:59:01 +0100,
Torquil Macdonald Sørensen wrote:
The problem manifests itself with the error message:

gsl: gamma.c:1454: ERROR: underflow
Default GSL error handler invoked.
Aborted

This results e.g. from trying to compute gsl_sf_bessel_il_scaled(100, 0.01)

Thus my question:

Can I find documentation that describes for which values of (l,x) for which the
function will compute a value successfully?

On wikipedia I found an asymptotic expression that works fine as long as
0<  x<<  sqrt(l+1), so I can use that instead if GSL only fails in cases when
that approximation is OK to my accuracy.

But it would be nice if I don't have to experiment to determine for which (l,x)
I can run the GSL function.

Or does anyone know of a more "robust" bessel function, e.g. in a different C /
C++ library?

Hello.  The value of il(100,0.01) is 8.45272785e-389 which is below
the limit of double-precision (1e-308) so underflow is the correct
result in this case.

If you find any values of (l,x) which give an underflow error when the
result should be in the range of double precision, please can you
submit them as a bug report to address@hidden  Thanks


Thanks Brian! Btw, would you say that any occurance of underflow corresponds to the output of that bessel function itself being smaller than 1e-308 ?

If it is that simple, I will simply replace by 0 manually when I get those underflow errors.

- Torquil



reply via email to

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