/* tcsolv.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: csolv Uses: cmprt cvmul unitary Input parameter: n -> size matrix is n by n and solution is an n-vector */ #include "ccmath.h" void main(int na,char **av) { int n,k; Cpx *a,*u,*v; unsigned int seed; if(na!=2){ printf("para: dim\n"); exit(1);} n=atoi(*++av); u=(Cpx *)calloc(n*n+2*n,sizeof(Cpx)); v=u+n*n; a=v+n; seed=543216789; setunfl(seed); for(k=0; k