/* housev.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 #include void housev(double *a,double *d,double *dp,int n) { double sc,x,y,h; int i,j,k,m,e; double *qw,*qs,*pc,*p; qs=(double *)calloc(n,sizeof(double)); for(j=0,pc=a; j0.){ sc=sqrt(sc); if((x= *(pc+1))<0.){ y=x-sc; h=1./sqrt(-2.*sc*y);} else{ y=x+sc; h=1./sqrt(2.*sc*y); sc= -sc;} for(i=0,qw=pc+1; i