GNU Scientific Library - Bugs: bug #47027, gsl_sf_coulomb_wave_FG_e returns...
You are not allowed to post comments on this tracker with your current authentication level.
bug #47027: gsl_sf_coulomb_wave_FG_e returns NaN but with success flag
Submitter: | Patrick Alken <psa> | ||
Submitted: | Sun 31 Jan 2016 12:49:29 AM UTC | ||
Category: | None | Severity: | 3 - Normal |
Operating System: | Status: | None | |
Assigned to: | None | Open/Closed: | Open |
Release: |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
No changes have been made to this item
from jenssss =at= phys =dot= au =dot= dk
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