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