4 #include "local_proto.h" 10 double suma = 0.0, sumb = 0.0, sumc = 0.0, sumd = 0.0, z, *xcopy;
13 if ((xcopy = (
double *)
malloc(n *
sizeof(
double))) ==
NULL) {
14 fprintf(stderr,
"Memory error in Cdhc_shapiro_francia\n");
18 for (i = 0; i < n; ++i)
21 qsort(xcopy, n,
sizeof(
double),
Cdhc_dcmp);
23 for (i = 0; i < n; ++i) {
28 sumd += xcopy[i] * xcopy[i];
31 y[0] = suma * suma / sumb / (sumd - sumc * sumc / n);
34 fprintf(stdout,
" TEST14 SF(N) =%10.4f\n", y[0]);
double Cdhc_xinormal(double)
double * Cdhc_weisberg_bingham(double *x, int n)
int Cdhc_dcmp(const void *i, const void *j)