X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fts%2Finnovations.c;h=ba2120fb4e6bc735f41d300b5aef406be5c2828d;hb=81579d9e9f994fb2908f50af41c3eb033d216e58;hp=553e20e8f7953a879595c3ddb0dce2e0e715b1dc;hpb=4aa40ed36fcdb13f73520945d804e6d3d8d52738;p=pspp-builds.git diff --git a/src/math/ts/innovations.c b/src/math/ts/innovations.c index 553e20e8..ba2120fb 100644 --- a/src/math/ts/innovations.c +++ b/src/math/ts/innovations.c @@ -1,5 +1,5 @@ /* 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 @@ -26,14 +26,19 @@ */ #include + +#include "math/ts/innovations.h" + #include #include +#include #include -#include -#include -#include -#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, @@ -160,7 +165,7 @@ innovations_update_scale (struct innovations_estimate *est, double *theta, 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; }