[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matr
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions |
Date: |
Wed, 16 Jun 2021 18:36:29 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0 |
Follow-up Comment #11, bug #60784 (project octave):
>From curiosity, I did a cross product of multiple types with multiple
functions using the code at the bottom of this comment. Here are the results:
Type logical:
Silent: add, subtract, matrix multiply, matrix ^ scalar, scalar ^ matrix,
det, lu, svd
Warning: inv (singular to machine precision)
Error: eig
Types int8, int16, int32, int64, uint8, uint16, uint32, uint64:
Silent: add, subtract, inv, det, lu, svd
Warning:
Error: matrix multiply, matrix ^ scalar, scalar ^ matrix, eig
Types single, double:
All functions work, no errors or warnings.
Code to test:
origA = rand(50); # type double
origB = rand(50); # type double
types = ["logical"; "int8"; "int16"; "int32"; "int64"; "uint8"; "uint16";
"uint32"; "uint64"; "single"; "double"];
funcs = ["A+B"; "A-B"; "A*B"; "A^1.6"; "(-1.6)^A"; "inv(A)"; "det(A)";
"lu(A)"; "eig(A)"; "svd(A)"];
for i = 1:size(types,1)
for j = 1:size(funcs,1)
str = sprintf("A = %s(origA); B = %s(origB); C = %s;",...
types(i,:), types(i,:), funcs(j,:));
disp(str)
try
eval(str)
catch
disp("error for the last operation")
end
disp(' ')
end
end
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60784>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, (continued)
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, Kai Torben Ohlhus, 2021/06/15
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, Dmitri A. Sergatskov, 2021/06/15
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, Dmitri A. Sergatskov, 2021/06/15
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, John W. Eaton, 2021/06/16
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, John W. Eaton, 2021/06/16
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, Kai Torben Ohlhus, 2021/06/16
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, Dmitri A. Sergatskov, 2021/06/16
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, Kai Torben Ohlhus, 2021/06/16
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, John W. Eaton, 2021/06/16
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, anonymous, 2021/06/16
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions,
anonymous <=
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, Kai Torben Ohlhus, 2021/06/16
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, anonymous, 2021/06/22
- [Octave-bug-tracker] [bug #60784] Inconsistent behavior for boolean matrix types with matrix functions, John W. Eaton, 2021/06/22