fix atan2,rename {hypot,hypot3} to {norm2,norm3}
[liba.git] / src / regress.c
blob07859fd4f119e07979a36ec41aef5c4078c6bac5
1 #include "a/regress.h"
2 #include "a/math.h"
4 void a_regress_odm_(a_size n, a_float const *p, a_float *odm, a_float p_mean)
6 for (; n; --n) { *odm++ = *p++ - p_mean; }
9 a_float a_regress_odm(a_size n, a_float const *p, a_float *odm)
11 a_float m = a_float_mean(p, n);
12 a_regress_odm_(n, p, odm, m);
13 return m;