Re: value of gsl_sf_bessel_i0_scaled at 0
victor.zverovich <at> gmail.com <victor.zverovich <at> gmail.com>
2012-07-12 16:59:42 GMT
After some experiments, I don't think it's a bug. In the documentation (
http://www.gnu.org/software/gsl/manual/html_node/Regular-Modified-Spherical-Bessel-Functions.html),
gsl_sf_bessel_i0_scaled
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).
where
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:
http://www.wolframalpha.com/input/?i=lim+exp%28-%7Cx%7C%29+sqrt%28pi%2F%282x%29%29+BesselI%5B1%2F2%2C+x%5D+as+x+-%3E+0%2B
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,
Victor
On Wed, Jul 11, 2012 at 5:16 PM, victor.zverovich <at> gmail.com <
victor.zverovich <at> gmail.com> wrote:
(Continue reading)