X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmath%2Fts%2Finnovations.c;h=b9a7cf223442a42ce597748320647a23a0739939;hb=9a331fe64eb814ae5c1322e21717a04fb254bf65;hp=3e3be2024711a727e8a382d48841213106c8f03e;hpb=9f087e7aa4cdff1d5d46d5e188c0017a9d2d0029;p=pspp-builds.git diff --git a/src/math/ts/innovations.c b/src/math/ts/innovations.c index 3e3be202..b9a7cf22 100644 --- a/src/math/ts/innovations.c +++ b/src/math/ts/innovations.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,7 @@ get_mean (const gsl_matrix *data, for (n = 0; n < data->size2; n++) { tmp = gsl_matrix_get (data, i, n); - if (!gsl_isnan (tmp)) + if (!isnan (tmp)) { est[n]->n_obs += 1.0; d = (tmp - est[n]->mean) / est[n]->n_obs; @@ -77,9 +76,9 @@ update_cov (struct innovations_estimate **est, gsl_vector_const_view x, { xj = gsl_vector_get (&x.vector, j); yj = gsl_vector_get (&y.vector, j); - if (!gsl_isnan (xj)) + if (!isnan (xj)) { - if (!gsl_isnan (yj)) + if (!isnan (yj)) { xj -= est[j]->mean; yj -= est[j]->mean; @@ -161,7 +160,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; }