projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replaced implementation of psppire-axis.
[pspp]
/
src
/
language
/
stats
/
reliability.q
diff --git
a/src/language/stats/reliability.q
b/src/language/stats/reliability.q
index edacdf12a1a5aea5fb615b91d07cfc0f80fb39cd..8384bb350312100214e33cfcff1b1f5057d70703 100644
(file)
--- a/
src/language/stats/reliability.q
+++ b/
src/language/stats/reliability.q
@@
-262,8
+262,11
@@
cmd_reliability (struct lexer *lexer, struct dataset *ds)
free (c->items);
moments1_destroy (c->total);
free (c->items);
moments1_destroy (c->total);
- for (x = 0 ; x < c->n_items; ++x)
- moments1_destroy (c->m[x]);
+
+ if ( c->m)
+ for (x = 0 ; x < c->n_items; ++x)
+ moments1_destroy (c->m[x]);
+
free (c->m);
}
free (c->m);
}
@@
-640,10
+643,10
@@
reliability_statistics_model_split (struct tab_table *tbl,
tab_float (tbl, 3, 8, TAB_RIGHT, g, 8, 3);
tmp = (1.0 - r*r) * rel->sc[1].n_items * rel->sc[2].n_items /
tab_float (tbl, 3, 8, TAB_RIGHT, g, 8, 3);
tmp = (1.0 - r*r) * rel->sc[1].n_items * rel->sc[2].n_items /
-
SQR
(rel->sc[0].n_items);
+
pow2
(rel->sc[0].n_items);
- uly = sqrt(
SQR (SQR (r)) + 4 * SQR
(r) * tmp);
- uly -=
SQR
(r);
+ uly = sqrt(
pow4 (r) + 4 * pow2
(r) * tmp);
+ uly -=
pow2
(r);
uly /= 2 * tmp;
tab_float (tbl, 3, 7, TAB_RIGHT, uly, 8, 3);
uly /= 2 * tmp;
tab_float (tbl, 3, 7, TAB_RIGHT, uly, 8, 3);