11 double d,
s, t = 0., *xcopy, m2, s1 = 0., s2, mn = 0.0;
13 if ((xcopy = (
double *)
malloc(n *
sizeof(
double))) ==
NULL) {
14 fprintf(stderr,
"Memory allocation error\n");
18 for (i = 0; i <
n; ++i)
21 qsort(xcopy, n,
sizeof(
double),
dcmp);
23 for (i = 0; i <
n; ++i) {
24 t += xcopy[i] * ((i + 1) - 0.5 * (n + 1));
29 for (i = 0; i <
n; ++i)
30 s1 += (xcopy[i] - m2) * (xcopy[i] - m2);
38 y[1] = sqrt((
double)n) * (y[0] - 0.28209479) / 0.02998598;
41 fprintf(stdout,
" TEST4 DAGN =%10.4f\n", y[0]);
int dcmp(const void *i, const void *j)
double * dagostino_d(double *x, int n)