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 shapiro_francia\n");
18 for (i = 0; i <
n; ++i)
21 qsort(xcopy, n,
sizeof(
double),
dcmp);
23 for (i = 0; i <
n; ++i) {
24 z =
xinormal((i + 1 - 0.375) / (n + 0.25));
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]);
int dcmp(const void *i, const void *j)
double * weisberg_bingham(double *x, int n)