bugGNU Scientific Library - Bugs: bug #29606, insufficient argument checks in...

 
 

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

bug #29606: insufficient argument checks in gsl_sf_coupling_6j

Submitted by:  -Deleted Account- <bjg>
Submitted on:  Mon 19 Apr 2010 10:53:28 AM UTC  
 
Category: Runtime errorSeverity: 3 - Normal
Operating System: Status: Fixed
Assigned to: -Deleted Account- <bjg>Open/Closed: Closed
Release: 1.14

Fri 12 Jul 2013 04:01:41 PM UTC, comment #2:

Fixed in revision 4836

Patrick Alken <psa>
Project Administrator
Tue 28 Aug 2012 02:11:34 PM UTC, comment #1:

From: -unavailable- Jason Detwiler
To: <bug-gsl@gnu.org>
Date: Tue, 21 Aug 2012 03:07:47 -0500
Subject: [Bug-gsl] gsl_sf_coupling_6j still missing triad sum check

Dear GNU developers,

I just re-encountered a two-year old bug in the calculation of
Wigner's 6-j (and, hence, 9-J) symbols. The original bug report is
here, from v1.13:

https://savannah.gnu.org/bugs/?29606

It is still unfixed in 1.15. The problem is that the routine fails to
check whether the each triad that passes the triangle selection also
have an even sum.I suggest fixing this by changing this block starting
at line 205 of specfunc/coupling.c from:

else if( triangle_selection_fails(two_ja, two_jb, two_jc)
|| triangle_selection_fails(two_ja, two_je, two_jf)
|| triangle_selection_fails(two_jb, two_jd, two_jf)
|| triangle_selection_fails(two_je, two_jd, two_jc)
) {
result->val = 0.0;
result->err = 0.0;
return GSL_SUCCESS;
}

to:

else if( triangle_selection_fails(two_ja, two_jb, two_jc)
|| ((two_ja + two_jb + two_jc) % 2)
|| triangle_selection_fails(two_ja, two_je, two_jf)
|| ((two_ja + two_je + two_jf) % 2)
|| triangle_selection_fails(two_jb, two_jd, two_jf)
|| ((two_jb + two_jd + two_jf) % 2)
|| triangle_selection_fails(two_je, two_jd, two_jc)
|| ((two_je + two_jd + two_jc) % 2)
) {
result->val = 0.0;
result->err = 0.0;
return GSL_SUCCESS;
}

Thank you,
Jason Detwiler

Rhys Ulerich <rhysu>
Project Administrator
Mon 19 Apr 2010 10:53:28 AM UTC, original submission:

From: "Hergert, Heiko" <hergert@nscl.msu.edu>
To: <bug-gsl@gnu.org>
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: -unavailable-
<< www : http://www.nscl.msu.edu
<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

-Deleted Account- <bjg>In charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by psa (Posted a comment)
  • -unavailable- added by rhysu
  • -unavailable- added by rhysu (Posted a comment)
  •  

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

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 12 Jul 2013 04:01:41 PM UTCpsaStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Tue 28 Aug 2012 10:33:51 PM UTCrhysuCarbon-Copy-=>Added -unavailable-
    Fri 07 May 2010 12:05:25 PM UTCbjgStatusNone=>Confirmed
      Assigned toNone=>bjg

    Back to the top


    Powered by Savane 3.1-cleanup