bugGNU Octave - Bugs: bug #41454, Inaccurate/incorrect result for...


bug #41454: Inaccurate/incorrect result for inverse of symmetric matrix

Submitted by:  Mattias Linde <linde>
Submitted on:  Tue 04 Feb 2014 11:32:42 AM UTC  
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Mon 17 Mar 2014 08:50:57 AM UTC, comment #1:

I can reproduce that error. Anyhow, I'm confused about the small differences that occured.

Max Görner <maxg>
Tue 04 Feb 2014 11:32:42 AM UTC, original submission:

Double precision calculations, machine epsilon at 2.2204e-16.
Input is a symmetric matrix with condition number 4.9337e+07
so at best I cant expect results with more precision than e-09.

AB = BA = Identity, where B = inverse(A)

Since A is symmetric, B should also be symmetric.

Problems I see is that:

  • B is not close to symmetric.
  • norm(AB-I) is 5e-1 where as norm(BA-I) is 5e-8

Problem seen in all the versions I've tested: 3.2.4,
3.6.0 and build from dev sources as of today.


Results from octave

Results from matlab 8.0:

I also tested changing from using sparse matrices, Hs = full(Hs) and that made things far worse.

Mattias Linde <linde>


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

Attach File(s):

Attached Files
file #30454:  invprecision.m added by linde (434B - text/x-objcsrc)
file #30455:  hs.mat added by linde (7kB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by maxg (Posted a comment)
  • -unavailable- added by linde (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 04 Feb 2014 11:32:42 AM UTClindeAttached File-=>Added invprecision.m, #30454
      Attached File-=>Added hs.mat, #30455

    Back to the top

    Powered by Savane 3.1-cleanup