4 #include "local_proto.h"
12 double suma = 0.0, sumb = 0.0, sumc = 0.0, sumd = 0.0, z, *xcopy;
15 if ((xcopy = (
double *)
malloc(n *
sizeof(
double))) ==
NULL) {
16 fprintf(stderr,
"Memory error in Cdhc_shapiro_francia\n");
20 for (i = 0; i < n; ++i)
23 qsort(xcopy, n,
sizeof(
double),
Cdhc_dcmp);
25 for (i = 0; i < n; ++i) {
30 sumd += xcopy[i] * xcopy[i];
33 y[0] = suma * suma / sumb / (sumd - sumc * sumc / n);
36 fprintf(stdout,
" TEST14 SF(N) =%10.4f\n", y[0]);
int Cdhc_dcmp(const void *i, const void *j)
double Cdhc_xinormal(double)
double * Cdhc_shapiro_francia(double *x, int n)