/* tssort.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: ssort dubcmp Uses: unfl surand Input parameter: n -> integer: size of sort list */ #include "ccmath.h" double *x,**v; void main(int na,char **av) { int i,n; if(na!=2){ printf("para: size\n"); exit(-1);} n=atoi(*++av); setunfl(123456789); x=(double *)calloc(n,sizeof(double)); v=(double **)calloc(n,sizeof(double *)); printf(" Test of Shell Sort\n"); printf(" %d points input\n",n); /* generate sort list of random values */ for(i=0; i