CC: John Darrington <john@darrington.wattle.id.au>
Fixes: 0b7e8882ce9b ("EXAMINE: Implement the Shapiro-Wilk Test.")
struct shapiro_wilk *
shapiro_wilk_create (int n, double mean)
{
+ if (n < 3 || n > 5000)
+ return NULL;
+
struct shapiro_wilk *sw = xzalloc (sizeof (*sw));
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;