bugGNU Scientific Library - Bugs: bug #46678, Bug in gsl_sf_coulomb_wave_F_array

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #46678: Bug in gsl_sf_coulomb_wave_F_array

Submitted by:  Patrick Alken <psa>
Submitted on:  Sat 12 Dec 2015 09:09:10 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Operating System: Status: None
Assigned to: NoneOpen/Closed: Open
Release: 

Sat 12 Dec 2015 09:09:10 PM UTC, original submission:

from nih =at= pks =dot= mpg =dot= de

Dear GSL developers,

I found a bug in the function gsl_sf_coulomb_wave_F_array which uses the recurrence relation to obtain F for different l's.
To be short, when eta is large, and l is at least moderately large, inaccuracy occurs in the implementation of the recurrence such that F has unphysical spikes at certain x for smaller l's.
My observation is that F is determined directly for the largest l, and F for smaller l's are determined from the recurrence relation.
When l is large, the number of recurrence is large to obtain F for small l's.
Therefore, errors in F's get accumulated as we proceed to get F for small l's.

Attached please find a test program.
The program uses two methods to obtain F for different l's and x's.
The first method obtains F directly, and the second method obtains F from recurrence relation.

Please compile it using "g++ testCoulomb.cpp -lgsl -lgslcblas".
Now run the program using "./a.out > resultCoulomb".
We can now take a look at the output of the program using gnuplot.
After launching gnuplot, just type plot "resultCoulomb" using 1:2 every ::2::2000 to see the output for l=0 at different x's using the first method.
And type plot "resultCoulomb" using 1:2 every ::2002::4000 to see the output for l=0 at different x's using the second method.

Now you can find, F is fine using the first method, but F has unphysical spikes.
You can see similar behaviors for other l's by "using 1:3", "using 1:4" etc in gnuplot.

I can of course always stick to the first method, but the second method is much faster.
So it would be great if you could fix this problem.

Patrick Alken <psa>
Project Administrator

 

Attached Files
file #35718:  testCoulomb.cpp added by psa (914B - text/x-c++src)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psa (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 12 Dec 2015 09:09:10 PM UTCpsaAttached File-=>Added testCoulomb.cpp, #35718

    Back to the top


    Powered by Savane 3.1-cleanup1