bugGNU Octave - Bugs: bug #49904, Inversion of a Hermitian matrix...

 
 

bug #49904: Inversion of a Hermitian matrix produces incorrect result

Submitted by:  Jonathan Lai <jlai319>
Submitted on:  Wed 21 Dec 2016 04:06:58 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.2.0Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 21 Dec 2016 08:42:19 PM UTC, comment #3:

I think this is the changeset that introduced the bug:

http://hg.savannah.gnu.org/hgweb/octave/rev/5ce959c55cc0

It looks like some cutting and pasting wiped out calls to std::conj...

I checked in the following changeset on stable and merged it with default:

http://hg.savannah.gnu.org/hgweb/octave/rev/db2a531717b3

John W. Eaton <jwe>
Project Administrator
Wed 21 Dec 2016 07:45:46 PM UTC, comment #2:

Here is what I see with 4.2.0:

and with 4.0.3:

Something seems messed up with the signs here. I'll take a look and see if I can spot what changed.

John W. Eaton <jwe>
Project Administrator
Wed 21 Dec 2016 06:30:20 PM UTC, comment #1:

The matrix Rxx is Hermitian, but is also ill-conditioned. The condition number is on the order of 10^4, so large numerical errors in calculating its inverse are to be expected.

Do you expect this to behave differently? Does Matlab behave differently?

Mike Miller <mtmiller>
Project Administrator
Wed 21 Dec 2016 04:06:58 PM UTC, original submission:

>> Rxx

Rxx =

1.00003 + 0.00000i -0.68292 + 0.26406i -0.57670 + 0.25291i 0.34986 + 0.03335i
-0.68292 - 0.26406i 0.94539 + 0.00000i 0.69006 - 0.03967i -0.43847 + 0.38619i
-0.57670 - 0.25291i 0.69006 + 0.03967i 0.95260 + 0.00000i -0.34734 + 0.40728i
0.34986 - 0.03335i -0.43847 - 0.38619i -0.34734 - 0.40728i 0.98356 + 0.00000i

>> inv(Rxx)

ans =

7412.81 + 0.00i 4404.95 - 4826.59i 3353.84 - 1286.54i -1916.52 - 5975.72i
4404.95 - 4826.59i 5762.91 + 0.00i 2829.13 + 1419.57i 2752.81 - 4799.16i
3353.84 - 1286.54i 2829.13 + 1419.57i 1743.11 + 0.00i 170.06 - 3036.83i
-1916.52 - 5975.72i 2752.81 - 4799.16i 170.06 - 3036.83i 5314.48 + 0.00i

Comment: Rxx is a Hermitian, but inv(Rxx) is not

Jonathan Lai <jlai319>

 

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

Attach File(s):
   
   
Comment:
   

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 jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by jlai319 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

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

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 21 Dec 2016 08:42:19 PM UTCjweStatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Wed 21 Dec 2016 07:45:46 PM UTCjweItem GroupIncorrect Result=>Regression
    Wed 21 Dec 2016 06:30:20 PM UTCmtmillerStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1