destroy (struct statistic *stat)
{
struct percentile *ptl = UP_CAST (stat, struct percentile, parent.parent);
- struct order_stats *os = &ptl->parent;
- free (os->k);
free (ptl);
}
ptl->w = W;
os->n_k = 2;
- os->k = xcalloc (2, sizeof (*os->k));
+ os->k = ptl->k;
os->k[0].tc = W * p;
os->k[1].tc = (W + 1.0) * p;