This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: about QAWF integration -- Fourier integrals


xie qiong writes:
 > double myfunc(double x, void *params)
 > {
 >         double a = *(double *)params;

Hi,
In this function add,

       if (x == 0.0) return 0.0;

to avoid computing 0/0.  The cutoff of 1e-30 is problematic with the
current implementation based on the original QUADPACK code.  This
could be improved in a future version of GSL.

 >         
 > 	return exp(- log(x) * log(x)/(2.0 * a * a)) /
 > (sqrt(2.0 * PI) * a * x);
 > }

regards
Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]