how bessel function work?

Higher orders of jn() seem to work just fine. So you should be able to use your own wrapper function that incorporates the suggested workaround:

double my_jn (int order, double a)
{ 
   double res;
   if (order == 0) {
      res = j0 (a);
   } else if (order == 1) {
      res = j1 (a);
   } else {
      res = jn (order, a);
   }
   return res;
}

Thanks for reporting this. As a workaround, please use j0(x) instead of jn(0,x) as njuffa suggested earlier. Note that the same problem applies to jn(1,x); in CUDA 5.5 and earlier, you will need to use j1(x) instead.

We will correct these to be properly equivalent in a future release.

EDIT: Sorry for the duplication; I hadn’t seen the second page of followups before posting my reply.

Thanks a lot :)