octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49470] [MXE] eig.cc-tst failure in __run_test


From: Avinoam Kalma
Subject: [Octave-bug-tracker] [bug #49470] [MXE] eig.cc-tst failure in __run_test_suite__.m with 64-bit-Octave
Date: Tue, 1 Nov 2016 11:32:44 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #5, bug #49470 (project octave):

The problem is with


function chol_qz_accuracy (A, B, is_qz_accurate, is_chol_accurate)
  [V1,D1] = eig (A,B, 'qz');
  [V2,D2] = eig (A,B); %default is chol
  assert (isequal (A*V1,A*V1*D1), is_qz_accurate)
  assert (isequal (A*V2, A*V2*D2), is_chol_accurate)
endfunction


The test is


>> A = diag([10^-16, 10^-15]);
>> chol_qz_accuracy (A, A, true, false);
error: ASSERT errors for:  assert (isequal (A * V2, A * V2 *
D2),is_chol_accurate)

  Location  |  Observed  |  Expected  |  Reason
     ()           1            0         Abs err 1 exceeds tol 0


In 32 bit version


debug> D1
D1 =

Diagonal Matrix

   1   0
   0   1

debug> D2
D2 =

Diagonal Matrix

   1.00000         0
         0   1.00000

debug> D2 - [1 0; 0 1]
ans =

  -1.1102e-016  -0.0000e+000
  -0.0000e+000  2.2204e-016


So 


assert (isequal (A*V2, A*V2*D2), is_chol_accurate)


pass.

In 64 bit


debug> D1
D1 =

Diagonal Matrix

   1   0
   0   1

debug> D2
D2 =

Diagonal Matrix

   1   0
   0   1

debug> D2 - [1 0; 0 1]
ans =

   0  -0
  -0   0


so A*V2 = A*V2*D2 and the test *fails*.

Actually this test looks wrong. it does not check the correct values of V1,
V2. It checks if D1, D2 are close enough to the unit matrix, and if D2 is
close enough, the test fails.

I suggest to replace the test with checking the values of V1, V2 with
tolernce, something like


 assert (V1, diag ([1,1]), 0)
 assert (V2, diag([10^8,3.16227766016838*10^7]),10^(-7))



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49470>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]