[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] Bessel Example results
From: |
David Zaslavsky |
Subject: |
Re: [Bug-gsl] Bessel Example results |
Date: |
Tue, 3 May 2016 20:54:01 +0800 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
The manual uses the cylindrical Bessel function in the example program,
not the spherical Bessel function. I checked the result from the manual
in Mathematica and it seems correct.
:) David
On 5/3/16 8:42 PM, Manuel Segovia wrote:
> Alex thank You very much
> Looks like the result indicated in the manual then is wrong
>>> -1.775967713143382920e-01
> Can you comment?
> Again thank you very much
>
>
> Manuel Segovia
>
>> On May 3, 2016, at 7:39 AM, Alex Shevtsov <address@hidden> wrote:
>>
>> Hi Manuel,
>>
>> Of course it is not a bug. The spherical Bessel function j_0 = sin(x)/x, so
>> you can check this value by direct calculation, which indeed gives the value
>> that you get.
>>
>> Best wishes,
>> Alex
>>
>>> On Tue, May 3, 2016 at 1:46 AM Manuel Segovia <address@hidden> wrote:
>>> Hello
>>> please check the following could this be a “bug”?
>>>
>>> gsl @2.1 (math, science)
>>> Mac OSX “el Capitan” 10.11.4
>>> i am using Clang and compile instructions are:
>>> clang -L/opt/local/lib -lgsl main.o -o bessel
>>>
>>> # include <stdio.h>
>>> # include <gsl/gsl_sf_bessel.h>
>>> int main (void)
>>> {
>>> double x = 5.0;
>>> double y = gsl_sf_bessel_j0 (x);
>>> printf ("JO(%g) = %.18e\n", x , y);
>>> return(0);
>>> }
>>> the result i get is JO(5) = -1.917848549326277019e-01
>>> instead of -1.775967713143382920e-01 this is the result indicated in the
>>> gsl manual 2.1 example program
>>> Thanks