clear all; 
close all;

% parameters
n  = 2000;
q1 = 30;
q2 = 300;
blksiz = 100;
tol = 1e-12;

% generate matrix
B = randn(n);
[QA,~] = qr(B,0);
S = [rand(q1,1); logspace(0,-14,q2)'; 1e-15*rand(n-q1-q2,1)];
S = S(randperm(n));
A = QA*diag(S)*QA';
semilogy(svd(A),'-o');


% TODO: fixed-tol RandSVD in fp64

% TODO: fixed-tol RandSVD in mixed fp64/fp32

