[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] gsl_sf_coulomb_wave_FG_e returns NaN but with success flag
From: |
Jens Søren Sieg Svensmark |
Subject: |
[Bug-gsl] gsl_sf_coulomb_wave_FG_e returns NaN but with success flag |
Date: |
Fri, 29 Jan 2016 14:33:31 +0000 |
Hi
For certain parameters the gsl_sf_coulomb_wave_FG_e returns a NaN value
for Gp (the derivative of the irregular Coulomb function), but the
function does not throw an error.
The problem seems to be similar to bug #30885.
I used gsl 1.16, from the repositories of Ubuntu 15.10.
The following example program
#include <stdio.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_sf_coulomb.h>
int
main (void)
{
gsl_sf_result F,G,Fp,Gp;
double exp_F,exp_G;
double eta=340;
double L=0;
double x=48.524525790349422;
int iret = gsl_sf_coulomb_wave_FG_e
(eta,x,L,0,&F,&Fp,&G,&Gp,&exp_F,&exp_G);
printf ("status = %s\n", gsl_strerror(iret));
printf ("F = %.18e\n"
" +/- % .18e\n",
F.val, F.err);
printf ("Fp = %.18e\n"
" +/- % .18e\n",
Fp.val, Fp.err);
printf ("G = %.18e\n"
" +/- % .18e\n",
G.val, G.err);
printf ("Gp = %.18e\n"
" +/- % .18e\n",
Gp.val, Gp.err);
return iret;
}
Gives the following output:
status = success
F = 2.593734965617792327e-309
+/- 2.593734965617787386e-312
Fp = 9.371127281856027958e-309
+/- 9.371127281859619815e-312
G = 5.343744177206742137e+307
+/- 5.343744177206741934e+304
Gp = -nan
+/- inf
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-gsl] gsl_sf_coulomb_wave_FG_e returns NaN but with success flag,
Jens Søren Sieg Svensmark <=