bugGNU Scientific Library - Bugs: bug #29773, ...

 
 

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

bug #29773: gsl_complex_pow_real(gsl_complex_rect(0,0),0) returns (0,0)

Submitter:  Rhys Ulerich <rhysu>
Submitted:  Tue 04 May 2010 03:31:33 PM UTC
   
 
Category:  Accuracy problem Severity:  3 - Normal
Operating System:  Ubuntu 8.04+ Status:  Fixed
Assigned to:  bjg Open/Closed:  Closed
Release:  1.14

Fri 07 May 2010 12:04:34 PM UTC, comment #2: 

I extended the automatically generated test cases to include a number of pow_real tests.

-Deleted Account- <bjg>
Thu 06 May 2010 02:39:21 PM UTC, comment #1: 

Patches applied in
commit 804b03d5d1ce2127a88f8d4dc5136d8eed9d2097
and
commit 24aa81aa88c909f1a45da1d0ef725f74f569bac0

Rhys Ulerich <rhysu>
Group administrator
Tue 04 May 2010 03:31:33 PM UTC, original submission:  

gsl_complex_pow_real incorrectly returns that (0+0i)^0 = (0+0i).  Based on the consistency with gsl_sf_pow_int and gsl_complex_pow, it should return (1+0i) for these inputs.

Simple standalone test case attached.  Problem is reproducible from at least 1.12 onward and with both the GNU and Intel compilers.

Original discussion at http://www.cygwin.com/ml/gsl-discuss/2010-q2/msg00004.html

Rhys Ulerich <rhysu>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #20460:  0001-capture-complex_pow_real-bug-29773.patch added by rhysu (2KiB - text/x-patch - 0001 captures the problem in a test case. 0002 fixes it.)
file #20461:  0002-Fix-29773-gsl_complex_pow_real-has-0-0i-0-1.patch added by rhysu (882B - text/x-patch - 0001 captures the problem in a test case. 0002 fixes it.)
file #20427:  testcase.c added by rhysu (256B - text/x-csrc - Standalone test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rhysu (Submitted the item)
  • -email is unavailable- added by rhysu
  •  

    Follow 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-05-06 rhysu Open/ClosedOpen Closed
    2010-05-06 rhysu StatusIn Progress Fixed
    2010-05-06 bjg StatusFixed In Progress
        Assigned torhysu bjg
        Open/ClosedClosed Open
    2010-05-06 rhysu StatusNone Fixed
        Assigned toNone rhysu
        Open/ClosedOpen Closed
    2010-05-06 rhysu Attached File- Added 0001-capture-complex_pow_real-bug-29773.patch, #20460
        Attached File- Added 0002-Fix-29773-gsl_complex_pow_real-has-0-0i-0-1.patch, #20461
    2010-05-04 rhysu Attached File- Added testcase.c, #20427
        Carbon-Copy- Added rhysu

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code