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 <[email protected]> >> 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 <[email protected]> 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
