% Test eigenvalue function - symmetric matrices function t = test_eig2 % First the float version t1all = 1; for i=2:4:100 a = float(randn(i)); a = a + a'; [v,d] = eig(a); emat = a*v - v*d; er = max(abs(emat(:))); bnd = 10*max(diag(abs(d)))*feps*i; t1 = (er < bnd); if (~t1) printf('test failed: er = %e bnd = %e (num %d)\n',er,bnd,i); end g = eig(a); e2 = max(abs(sort(g)-sort(diag(d)))); tb = e2