From http://lists.gnu.org/archive/html/buggsl/201311/msg00008.html and behavior confirmed on GSL 1.16:
I think this is distinct from other bugs in the gsl bug database. No error is reported by gsl_sf_bessel_Jn_e.
$ cat testgsl.c
/*
 Bug in gsl_sf_bessel_Jn (and related functions)
*/
#include <stdio.h>
#include <math.h>
#include <gsl/gsl_sf_bessel.h>
int main (int argc, char **argv) {
double x = M_PI * 128 * 127.999;
int nmin = 46335, nmax = 46345, i;
for (i = nmin; i <= nmax; ++i) {
double gsl_res = gsl_sf_bessel_Jn (i, x);
double sys_res = jn (i, x);
printf ("For (%d, %f), gsl gave %f, jn() gave %f\n", i, x, gsl_res,
sys_res);
}
return 0;
}
$ gcc O testgsl.c o testgsl lgsl lgslcblas lm
$ ./testgsl
For (46335, 51471.451913), gsl gave 0.004580, jn() gave 0.004580
For (46336, 51471.451913), gsl gave 0.005310, jn() gave 0.005310
For (46337, 51471.451913), gsl gave 0.004980, jn() gave 0.004980
For (46338, 51471.451913), gsl gave 0.003657, jn() gave 0.003657
For (46339, 51471.451913), gsl gave 0.001604, jn() gave 0.001604
For (46340, 51471.451913), gsl gave 0.000769, jn() gave 0.000769
For (46341, 51471.451913), gsl gave nan, jn() gave 0.002988
For (46342, 51471.451913), gsl gave nan, jn() gave 0.004612
For (46343, 51471.451913), gsl gave nan, jn() gave 0.005316
For (46344, 51471.451913), gsl gave nan, jn() gave 0.004961
For (46345, 51471.451913), gsl gave nan, jn() gave 0.003618
Thanks
Paul
