// test update
double[][] aa = buildMatrix(a);
double[] s = new double[aa.length],t = new double[aa.length];
ranvec(s); ranvec(t);
double[] u = new double[aa.length],v = buildVector(t);
aqr.qtmult(s,u);
aqr.update(u,v);
for (i=0;i<aa.length;i++) for (j=0;j<aa.length;j++) a[i][j] = aa[i][j]+s[i]*t[j];
localflag = maxel(matsub(matmul(transpose(aqr.qt),aqr.r),a)) > sbeps;
globalflag = globalflag || localflag;
if (localflag) {