projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use macros from cast.h instead of literal casts
[pspp]
/
src
/
math
/
ts
/
innovations.c
diff --git
a/src/math/ts/innovations.c
b/src/math/ts/innovations.c
index 553e20e8f7953a879595c3ddb0dce2e0e715b1dc..3ab2f3edce165ed0a709688e711867986683eee3 100644
(file)
--- a/
src/math/ts/innovations.c
+++ b/
src/math/ts/innovations.c
@@
-26,10
+26,14
@@
*/
#include <config.h>
*/
#include <config.h>
+
+#include <math.h>
+#include <stdlib.h>
+
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
-#include <stdlib.h>
#include <libpspp/compiler.h>
#include <libpspp/compiler.h>
+#include <libpspp/misc.h>
#include <math/coefficient.h>
#include <math/ts/innovations.h>
#include <math/coefficient.h>
#include <math/ts/innovations.h>
@@
-160,7
+164,7
@@
innovations_update_scale (struct innovations_estimate *est, double *theta,
for (j = 0; j < i; j++)
{
k = i - j - 1;
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;
}
}
est->scale[i] = result;
}