projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: Avoid using \b in sed regular expressions.
[pspp]
/
src
/
math
/
percentiles.c
diff --git
a/src/math/percentiles.c
b/src/math/percentiles.c
index ed7b129576f1f7d6b713f46af75ef77aeab3dbf8..9055279b5afa1db5f54db6a0cb062eaf734d78bf 100644
(file)
--- a/
src/math/percentiles.c
+++ b/
src/math/percentiles.c
@@
-48,8
+48,6
@@
percentile_calculate (const struct percentile *ptl, enum pc_alg alg)
struct percentile *mutable = CONST_CAST (struct percentile *, ptl);
const struct order_stats *os = &ptl->parent;
struct percentile *mutable = CONST_CAST (struct percentile *, ptl);
const struct order_stats *os = &ptl->parent;
- assert (os->cc == ptl->w);
-
if ( ptl->g1 == SYSMIS)
mutable->g1 = (os->k[0].tc - os->k[0].cc) / os->k[0].c_p1;
if ( ptl->g1 == SYSMIS)
mutable->g1 = (os->k[0].tc - os->k[0].cc) / os->k[0].c_p1;
@@
-176,7
+174,7
@@
percentile_create (double p, double W)
ptl->w = W;
os->n_k = 2;
ptl->w = W;
os->n_k = 2;
- os->k = xcalloc (
sizeof (*os->k), 2
);
+ os->k = xcalloc (
2, sizeof (*os->k)
);
os->k[0].tc = W * p;
os->k[1].tc = (W + 1.0) * p;
os->k[0].tc = W * p;
os->k[1].tc = (W + 1.0) * p;