This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
problem in gsl_sf_bessel_Jn
- To: gsl-discuss at sources dot redhat dot com
- Subject: problem in gsl_sf_bessel_Jn
- From: Arvid Requate <arvid at Mathematik dot Uni-Bielefeld dot DE>
- Date: Mon, 9 Jul 2001 21:28:17 +0200
Hi,
there seem to be problems within gsl_sf_bessel_Jn and gsl_sf_bessel_Jn_array:
- for n<168 they do not return exactly the same results.
- for n=168 only gsl_sf_bessel_Jn returns successfull
- for n>168 both routines return with errors (e.g. in airy.c)
some example code (c++) is attached.
Kind regards
Arvid Requate
--
get my gpg key from wwwkeys.de.pgp.net to send private mail or check signature.
GPG Key 1024D/B69C1591 <arvid@mathematik.uni-bielefeld.de>
fingerprint = 860E 230B 84E8 7CFE 401F 3EB1 F259 1F78 B69C 1591
#include "gsl/gsl_sf.h"
#include "stream.h"
main(){
int Nmin = 0;
int Nmax=167;
double data[Nmax-Nmin+1], arg, x;
arg = 1.88;
gsl_sf_bessel_Jn_array(Nmin, Nmax, arg, data);
for (int i = 0; i <= Nmax; ++i) {
x=gsl_sf_bessel_Jn(i, arg);
cout << "Jn: " << i << " " << x << endl;
cout << "Jn_array: " << i << " " << data[i] << endl;
cout << "Difference: " << " " << data[i] - x << endl;
}
x=gsl_sf_bessel_Jn(Nmax+1, arg);
cout << "Jn: " << Nmax+1 << " " << x << endl;
double data2[Nmax-Nmin+2];
gsl_sf_bessel_Jn_array(Nmin, Nmax+1, arg, data2);
cout << "Jn_array: " << Nmax+1 << " " << data[Nmax+1] << endl;
cout << "Difference: " << " " << data[Nmax+1] - x << endl;
}