[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty s
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix. |
Date: |
Wed, 15 May 2019 13:46:25 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko |
Follow-up Comment #58, bug #56232 (project octave):
@Marco: This is looking good.
On the question of inv(zeros(2)), I think we should retain current behavior
and Matlab compatibility and return a matrix of all Inf.
I ran 'make check' and got this one failing test
>>>>> processing /home/rik/wip/Projects_Mine/octave-dbg/test/diag-perm.tst
***** test
x = diag (1:3);
assert (inv (x), diag ([1 1/2 1/3]));
x = diag (0:2);
assert (inv (x), diag ([Inf 1 1/2]));
!!!!! test failed
ASSERT errors for: assert (inv (x),diag ([Inf, 1, 1 / 2]))
Location | Observed | Expected | Reason
(2,2) Inf 1 'Inf' mismatch
(3,3) Inf 0.5 'Inf' mismatch
In Matlab and Octave,
x = full (diag ([Inf, 1, 1/2]))
inv (x)
x =
Inf 0.00000 0.00000
0.00000 1.00000 0.00000
0.00000 0.00000 0.50000
inv (x)
warning: matrix singular to machine precision
ans =
0 -0 -0
0 1 -0
0 0 2
Should the implementation of diagonal matrices be more like sparse (Inf
whenever the element is non-zero) or should it be more like full matrices (the
result above which is 1./diagonal_matrix)?
This is simple to fix
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56232>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., (continued)
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/09
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Kai Torben Ohlhus, 2019/05/09
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/09
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Kai Torben Ohlhus, 2019/05/10
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Kai Torben Ohlhus, 2019/05/10
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/13
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/13
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/14
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/14
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/15
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix.,
Rik <=
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Kai Torben Ohlhus, 2019/05/15
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Marco Caliari, 2019/05/16
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Kai Torben Ohlhus, 2019/05/17
- [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix., Rik, 2019/05/18