Hi All,
I don't know what the policy is regarding optimizations which
(slightly) decrease code readability, but there's a simple change to
the downward recurrence in gsl_sf_bessel_Jn_e which doubles the speed
of the function (almost all the remaining time is spent in
gsl_sf_bessel_J_CF1) for n of order 10-40.
The modified code is listed below.
Cheers
Jonny
double twoInvX = 2.0 / x;
double kf;
for(k=n, kf=n; k>0; k--, kf--) {
Jkm1 = kf*twoInvX * Jk - Jkp1;
Jkp1 = Jk;
Jk = Jkm1;
}
_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl