functions.c (gnumeric-1.12.49.tar.xz) | : | functions.c (gnumeric-1.12.50.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 5015 | skipping to change at line 5015 | |||
value_array_set (result, 0, 1, | value_array_set (result, 0, 1, | |||
value_new_error_VALUE (ei->pos)); | value_new_error_VALUE (ei->pos)); | |||
} else { | } else { | |||
int i; | int i; | |||
gnm_float dplus, dminus; | gnm_float dplus, dminus; | |||
gnm_float p, nd; | gnm_float p, nd; | |||
gnm_float *ys; | gnm_float *ys; | |||
gnm_float val; | gnm_float val; | |||
gnm_float stat; | gnm_float stat; | |||
ys = range_sort (xs, n); | ys = gnm_range_sort (xs, n); | |||
val = pnorm (ys[0], mu, sigma, TRUE, FALSE); | val = pnorm (ys[0], mu, sigma, TRUE, FALSE); | |||
dplus = 1./(gnm_float)n - val; | dplus = 1./(gnm_float)n - val; | |||
dminus = val; | dminus = val; | |||
for (i = 1; i < n; i++) { | for (i = 1; i < n; i++) { | |||
gnm_float one_dplus, one_dminus; | gnm_float one_dplus, one_dminus; | |||
val = pnorm (ys[i], mu, sigma, TRUE, FALSE); | val = pnorm (ys[i], mu, sigma, TRUE, FALSE); | |||
one_dplus = (i + 1)/(gnm_float)n - val; | one_dplus = (i + 1)/(gnm_float)n - val; | |||
one_dminus = val - i/(gnm_float)n; | one_dminus = val - i/(gnm_float)n; | |||
skipping to change at line 5126 | skipping to change at line 5126 | |||
value_array_set (result, 0, 0, | value_array_set (result, 0, 0, | |||
value_new_error_VALUE (ei->pos)); | value_new_error_VALUE (ei->pos)); | |||
value_array_set (result, 0, 1, | value_array_set (result, 0, 1, | |||
value_new_error_VALUE (ei->pos)); | value_new_error_VALUE (ei->pos)); | |||
} else { | } else { | |||
int i; | int i; | |||
gnm_float stat_; | gnm_float stat_; | |||
gnm_float *ys; | gnm_float *ys; | |||
gnm_float *zs; | gnm_float *zs; | |||
ys = range_sort (xs, n); | ys = gnm_range_sort (xs, n); | |||
zs = g_new (gnm_float, n); | zs = g_new (gnm_float, n); | |||
for (i = 0; i < n; i++) | for (i = 0; i < n; i++) | |||
zs[i] = qnorm ((((gnm_float)(i+1))-3./8.)/(n+0.25), 0., 1 ., TRUE, FALSE); | zs[i] = qnorm ((((gnm_float)(i+1))-3./8.)/(n+0.25), 0., 1 ., TRUE, FALSE); | |||
if (gnm_range_correl_pop (ys, zs, n, &stat_)) { | if (gnm_range_correl_pop (ys, zs, n, &stat_)) { | |||
value_array_set (result, 0, 0, | value_array_set (result, 0, 0, | |||
value_new_error_VALUE (ei->pos)); | value_new_error_VALUE (ei->pos)); | |||
value_array_set (result, 0, 1, | value_array_set (result, 0, 1, | |||
value_new_error_VALUE (ei->pos)); | value_new_error_VALUE (ei->pos)); | |||
skipping to change at line 5214 | skipping to change at line 5214 | |||
value_array_set (result, 0, 0, | value_array_set (result, 0, 0, | |||
value_new_error_VALUE (ei->pos)); | value_new_error_VALUE (ei->pos)); | |||
value_array_set (result, 0, 1, | value_array_set (result, 0, 1, | |||
value_new_error_VALUE (ei->pos)); | value_new_error_VALUE (ei->pos)); | |||
} else { | } else { | |||
int i; | int i; | |||
gnm_float total = 0.; | gnm_float total = 0.; | |||
gnm_float p; | gnm_float p; | |||
gnm_float *ys; | gnm_float *ys; | |||
ys = range_sort (xs, n); | ys = gnm_range_sort (xs, n); | |||
for (i = 0; i < n; i++) { | for (i = 0; i < n; i++) { | |||
gnm_float val = pnorm (ys[i], mu, sigma, TRUE, FALSE); | gnm_float val = pnorm (ys[i], mu, sigma, TRUE, FALSE); | |||
gnm_float delta; | gnm_float delta; | |||
delta = val - (2*i+1)/(2. * n); | delta = val - (2*i+1)/(2. * n); | |||
total += (delta * delta); | total += (delta * delta); | |||
} | } | |||
total += (1 / (12 * (gnm_float)n)); | total += (1 / (12 * (gnm_float)n)); | |||
value_array_set (result, 0, 1, | value_array_set (result, 0, 1, | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |