Le 02/04/2015 14:28, Julien Bect a
écrit :
Le 02/04/2015 10:18, Marco Atzeri a écrit :
***** test
n = 4;
A = triu (rand (n));
x = rand (n, 1);
b = A' * x;
opts.UT = true;
opts.TRANSA = true;
assert (linsolve (A, b, opts), A' \ b);
!!!!! test failed
ASSERT errors for: assert (linsolve (A, b, opts),A' \ b)
Location | Observed | Expected | Reason
(1) 0.42063 0.42063 Abs err 5.5511e-17
exceeds tol 0
(2) 0.68722 0.68722 Abs err 4.1078e-15
exceeds tol 0
(3) 0.25533 0.25533 Abs err 2.1094e-15
exceeds tol 0
(4) 0.52907 0.52907 Abs err 7.3275e-15
exceeds tol 0
Has anybody seen this ? Perhaps should we introduce a
tolerance for
these tests ?
a zero tolerance is seldom a good idea.
It should be several eps as minimum.
I agree, but in this case it would require 34 * eps to pass this
test... Is it acceptable ?
Actually, this test uses random data and therefore fails randomly
if i hit "test linsolve" repeatedly in Octave.
Perhaps would it be more reasonable to specify a 4x4 matrix
explicitely *and* set some tolerance (say, 50 * eps) for the
comparison ?
I have filed a bug report and provided a patch:
https://savannah.gnu.org/bugs/index.php?44722
|