pivot table procedure conceptually works
[pspp] / src / math / percentiles.c
index ed7b129576f1f7d6b713f46af75ef77aeab3dbf8..9055279b5afa1db5f54db6a0cb062eaf734d78bf 100644 (file)
@@ -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;
 
-  assert (os->cc == ptl->w);
-
   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;
-  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;