#include "libpspp/message.h"
#include "gettext.h"
-#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
/* Return the sum of coeff[i] * x^i for all i in the range [0,order).
struct shapiro_wilk *
shapiro_wilk_create (int n, double mean)
{
- struct shapiro_wilk *sw = xzalloc (sizeof (*sw));
+ if (n < 3 || n > 5000)
+ return NULL;
+
+ struct shapiro_wilk *sw = XZALLOC (struct shapiro_wilk);
struct order_stats *os = &sw->parent;
struct statistic *stat = &os->parent;
sw->n = n;
- if (n < 3 || n > 5000)
- return NULL;
-
const double u = 1.0 / sqrt (sw->n);
double m = 0;
sw->warned = false;
- stat->accumulate = acc;
+ os->accumulate = acc;
stat->destroy = destroy;
return sw;