bugGNU Scientific Library - Bugs: bug #23247, gsl_complex_inverse for real gives...

 
 

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

bug #23247: gsl_complex_inverse for real gives -0 for imaginary part

Submitter:  -Deleted Account- <bjg>
Submitted:  Tue 13 May 2008 05:48:06 PM UTC
   
 
Category:  Accuracy problem Severity:  2 - Minor
Operating System:  Status:  Invalid
Assigned to:  None Open/Closed:  Closed
Release:  1.11

Tue 18 Nov 2008 07:47:32 PM UTC, comment #2: 

Given that the inverse of x+iy is (x-iy)/|z|^2 I believe that returning the reciprocal of 1/(x+i0) as (1/x)-i0 is correct (i.e. when looked at as a limiting value).

-Deleted Account- <bjg>
Tue 13 May 2008 05:49:16 PM UTC, comment #1: 

Need to check what Kahan IEEE complex branch paper says on 1/z with +-0 for imag.

-Deleted Account- <bjg>
Tue 13 May 2008 05:48:06 PM UTC, original submission:  

From: Chris <chris.colemansmith@gmail.com>
To: -email is unavailable-
Subject: Re: [Bug-gsl] Complex: gsl_complex_div_real bug
Date: Wed, 7 May 2008 19:16:58 -0700

if you do use the gsl_complex_inverse on a complex
number z which has a zero imaginary part then the imaginary part
becomes negative zero instead of still being zero.

Output from sample program:
$ ./a.out
0.25,-0

-Deleted Account- <bjg>

 

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

Attached Files
file #15660:  negz.c added by bjg (347B - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Follow 3 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2008-11-18 bjg StatusNone Invalid
    Open/ClosedOpen Closed
2008-05-13 bjg Attached File- Added negz.c, #15660

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code