bugGNU Scientific Library - Bugs: bug #55412, Bessel function returns incorrect...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #55412: Bessel function returns incorrect value

Submitter:  Vladimir Khodygo <vladk>
Submitted:  Mon 07 Jan 2019 05:59:39 PM UTC
   
 
Category:  Documentation Severity:  3 - Normal
Operating System:  Status:  Fixed
Assigned to:  None Open/Closed:  Closed
Release:  any

Fri 23 Apr 2021 02:54:59 AM UTC, comment #1: 

Note that the documentation uses the cylindrical Bessel function gsl_sf_bessel_J0, while your program uses the spherical Bessel function gsl_sf_bessel_j0. Both outputs are correct, and the documentation is correct.

Patrick Alken <psa>
Group administrator
Mon 07 Jan 2019 05:59:39 PM UTC, original submission:  

If you run

# include <stdio.h>
# include <gsl/gsl_sf_bessel.h>
int main (void)
{
double x = 5.0;
double y = gsl_sf_bessel_j0 (x);
printf ("J0(%g) = %.18e\n", x, y);
return(0);
}


you get

JO(5) =  -1.917848549326277019e-01


That is correct answer according to the definition sin(x)/x.
However, the documentation says that the answer is
J0(5) = -1.775967713143382642e-01

Vladimir Khodygo <vladk>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psa (Posted a comment)
  • -email is unavailable- added by vladk (Submitted the item)
  •  

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-04-23 psa StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code