bugGNU Octave - Bugs: bug #65054, inv (x) should return same results...


bug #65054: inv (x) should return same results for exceptional matrices regardless of form of matrix, and agree with rcond

Submitter:  Rik <rik5>
Submitted:  Tue 19 Dec 2023 11:31:40 PM UTC
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  In Progress Assigned to:  rik5
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  10.1.0 (current default)
* Mandatory Fields

Add a New Comment Rich Markup

Wed 20 Dec 2023 07:54:52 PM UTC, comment #3: 
Rik <rik5>
Group administrator
Wed 20 Dec 2023 06:06:26 PM UTC, comment #2: 

This is the paper describing the direction lapack is moving wrt those issues:


just fyi.


Dmitri A. Sergatskov <dasergatskov>
Wed 20 Dec 2023 04:25:08 PM UTC, comment #1: 

I reviewed the code for inverse and the problems run much deeper.  There are three different routines for calculating the inverse and they all need to be made consistent with each other and with the results of calling rcond() directly.

Changing bug title to reflect this.

Rik <rik5>
Group administrator
Tue 19 Dec 2023 11:31:40 PM UTC, original submission:  

For consistency, the inverse of a singular matrix should return all Inf.  For example,

inv (1e22*ones(2,2))
warning: matrix singular to machine precision
ans =

   Inf   Inf
   Inf   Inf

Currently Octave usually returns all NaN matrix along with an rcond of NaN.  However, this depends on the version of BLAS being used.  Such a dependency is undesirable as well as being the wrong result.

Rik <rik5>
Group administrator


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-20 rik5 Releasestable dev
    2023-12-20 rik5 Summaryinv (Inf (2,2)) should return matrix of all Inf and rcond of 0 inv (x) should return same results for exceptional matrices regardless of form of matrix, and agree with rcond

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code