4 #include "local_proto.h"
9 double suma = 0.0, sumb = 0.0, sumc = 0.0, sumd = 0.0, z, *xcopy;
12 if ((xcopy = (
double *)
malloc(n *
sizeof(
double))) ==
NULL) {
13 fprintf(stderr,
"Memory error in Cdhc_shapiro_francia\n");
17 for (i = 0; i < n; ++i)
20 qsort(xcopy, n,
sizeof(
double),
Cdhc_dcmp);
22 for (i = 0; i < n; ++i) {
27 sumd += xcopy[i] * xcopy[i];
30 y[0] = suma * suma / sumb / (sumd - sumc * sumc / n);
33 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_weisberg_bingham(double *x, int n)