/* thevmax.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.) * ------------------------------------------------------------------------ */ /* Test: hevmax Uses: unitary hmgen cvmul cvnrm cmprt Input parameter: n -> dimension (matrix is n by n) */ #include #include "ccmath.h" void main(int na,char **av) { Cpx *h,*u,*v,*w,c; int i,n; double *ev,e; void *calloc(); unsigned int seed; if(na!=2){ printf("para: dim\n"); exit(1);} n=atoi(*++av); seed=123456789; setunfl(seed); ev=(double *)calloc(n,sizeof(double)); h=(Cpx *)calloc(2*(n*n+n),sizeof(Cpx)); u=h+n*n; v=u+n*n; w=v+n; for(i=0,e=1.; i