[R] Error in besselJ(pi/2, 1E-15)?

Mikael Jagan j@g@nmn2 @end|ng |rom gm@||@com
Mon Dec 29 22:10:24 CET 2025


These lines (561-567) of src/nmath/bessel_j.c seem relevant. :-)


     L250:
     	    /* ---------------------------------------------------
     	       Normalize.  Divide all b[N] by sum.
     	       ---------------------------------------------------*/
     /*	    if (nu + 1. != 1.) poor test */
     	    if(fabs(nu) > 1e-15)
     		sum *= (Rf_gamma_cody(nu) * pow(.5* *x, -nu));


Mikael



More information about the R-help mailing list