/* PSPP - a program for statistical analysis.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
#include <config.h>
+
+#include "math/ts/innovations.h"
+
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
+#include <math.h>
#include <stdlib.h>
-#include <libpspp/compiler.h>
-#include <math/coefficient.h>
-#include <math/ts/innovations.h>
-#include "xalloc.h"
+#include "libpspp/compiler.h"
+#include "libpspp/misc.h"
+#include "math/coefficient.h"
+
+#include "gl/xalloc.h"
static void
get_mean (const gsl_matrix *data,
for (j = 0; j < i; j++)
{
k = i - j - 1;
- result -= theta[k] * theta[k] * est->scale[j];
+ result -= pow2 (theta[k]) * est->scale[j];
}
est->scale[i] = result;
}