bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gsl] [bug #29606] insufficient argument checks in gsl_sf_coupling_6


From: Brian Gough
Subject: [Bug-gsl] [bug #29606] insufficient argument checks in gsl_sf_coupling_6j
Date: Mon, 19 Apr 2010 10:53:28 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.11) Gecko/2009061118 Fedora/3.0.11-1.fc9 Firefox/3.0.11

URL:
  <http://savannah.gnu.org/bugs/?29606>

                 Summary: insufficient argument checks in gsl_sf_coupling_6j 
                 Project: GNU Scientific Library
            Submitted by: bjg
            Submitted on: Mon Apr 19 11:53:28 2010
                Category: Runtime error
                Severity: 3 - Normal
        Operating System: 
                  Status: None
             Assigned to: None
             Open/Closed: Open
                 Release: 1.14
         Discussion Lock: Any

    _______________________________________________________

Details:

From: "Hergert, Heiko" <address@hidden>
To: <address@hidden>
Subject: [Bug-gsl] Error in 6j symbol routine (gsl_sf_coupling_6j)
Date: Thu, 15 Apr 2010 15:11:24 -0400

Hi,

I just came about this bug in gsl_sf_coupling_6j() in GSL 1.13 (haven't
checked newer builds).

The check of the triangle conditions (via the routine
triangle_selection_fails) doesn't properly rule out all unphysical
combinations of angular momenta. For instance

gsl_sf_coupling(0, 2, 2, 44, 43, 43) = 0.087039

but the routine should return 0 since this symbol is unphysical:
jb=1 and jc=21 cannot be coupled to jf=43/2=21.5 although the triangle
tests are nominally satisfied

abs(1-21.5)=20.5 <= 21 <= 22.5.

A possible fix would be to check if

(two_ja + two_jb + two_jc)%2 == 0

ja+jb+jc is always integer in physically allowed couplings (i.e.,
2*(ja+jb+jc) must be even).

The routine for the 3j symbol is not similarly affected due to the
additional m_selection_fails() test.

-- 
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<< Heiko Hergert
<< National Superconducting Cyclotron Laboratory
<< Michigan State University
<<
<< phone: +1 517 908 7472
<< mail: address@hidden
<< www : http://www.nscl.msu.edu
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?29606>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]