|
From: | Julien Bect |
Subject: | Re: Failed test in linsolve.m |
Date: | Thu, 02 Apr 2015 14:28:25 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
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 0Has 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 ?
[Prev in Thread] | Current Thread | [Next in Thread] |