clear all
n=900;
[q,~]=qr(randn(n)+1i*randn(n));
d=0:(n/10 -1);
d(1)=100*eps;   % tiny smallest eig
d=kron(ones(10,1),d);
p=randperm(n);
d=d(p);
A=q*diag(d)*q';
A=(A+A')/2;
B=A;
tic;[ua,da]=eig(A);toc
tic;[ub,db,s]=condeig(B);toc
