bugGNU Scientific Library - Bugs: bug #42042, nan bug in bessel_Jnu

 
 

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

bug #42042: nan bug in bessel_Jnu

Submitter:  Patrick Alken <psa>
Submitted:  Thu 03 Apr 2014 09:36:21 PM UTC
   
 
Category:  Runtime error Severity:  3 - Normal
Operating System:  Status:  None
Assigned to:  None Open/Closed:  Open
Release: 

Thu 03 Apr 2014 09:36:21 PM UTC, original submission:  

Hello everyone,

I have this particular problem where I need

gsl_sf_bessel_Jnu(0.5, 3/2 * pi)

and I tested it with the following code:


#include <stdio.h>
#include <math.h>
#include <gsl/gsl_sf_bessel.h>

int
main (void)
{
  double y1 = gsl_sf_bessel_Jnu(0.5, 3.0/2.0 * M_PI+1e-15);
  double y2 = gsl_sf_bessel_Jnu(0.5, 3.0/2.0 * M_PI);

  printf ("%e vs. %e\n", y1, y2);
  return 0;
}

Output:

-3.675526e-01 vs. nan

MATLAB e.g. does return the correct value for 3/2 * pi. Is this a bug in
the implementation of the function? It seems so and I have not found
documentation about irregularities at 3/2 PI.

Patrick Alken <psa>
Group administrator

 

(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 (Submitted the item)
  •  

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code