/* qrbdu1.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ #include int qrbdu1(double *dm,double *em,double *um,int mm,double *vm,int m) { int i,j,k,n,jj,nm; double u,x,y,a,b,c,s,t,w,*p,*q; for(j=1,t=fabs(dm[0]); jt) t=s; t*=1.e-15; n=100*m; nm=m; for(j=0; m>1 && j0 ;--k){ if(fabs(em[k-1])0.){ c=sqrt((u+a)/(u+u)); if(c!=0.) s/=(c*u); else s=1.; for(i=k; ik){ a=s*em[i]; b*=c; em[i-1]=u=sqrt(x*x+a*a); c=x/u; s=a/u; } a=c*y+s*b; b=c*b-s*y; for(jj=0,p=vm+i; jj