[Top][All Lists]

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

Re: [Bug-gsl] value of gsl_sf_bessel_i0_scaled at 0

From: address@hidden
Subject: Re: [Bug-gsl] value of gsl_sf_bessel_i0_scaled at 0
Date: Thu, 12 Jul 2012 09:59:42 -0700

After some experiments, I don't think it's a bug. In the documentation (
and gsl_sf_bessel_i0_scaled_e are defined as follows:

  These routines compute the scaled regular modified spherical Bessel
function of zeroth order, \exp(-|x|) i_0(x).


  i_l(x) = \sqrt{\pi/(2x)} I_{l+1/2}(x)

If you use the formula for i_0(x) from the documentation, Wolfram Alpha,
which is based on Mathematica, gives different values (-1 and 1) for one
sided limits:


However, assuming \sqrt(x) = i \sqrt(-x) for negative x, gives

i_0(x) = \exp(-|x|) sinh(x) / x

and i_0(0) = 1 which is consistent with the GSL implementation.

Best regards,

On Wed, Jul 11, 2012 at 5:16 PM, address@hidden <
address@hidden> wrote:

> Hi All,
> Is there any particular reason that gsl_sf_bessel_i0_scaled(0) returns 1
> instead of NaN, or is it a bug? The function has different one-sided limits
> at 0 (-1 and 1).
> Thanks,
> Victor

reply via email to

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