8 double sum = 0, sumsq = 0, sumabs = 0;
9 double dev = 0, dev2 = 0;
15 for (i = 0; i <
count; i++) {
17 sumabs += fabs(data[i]);
18 sumsq += data[i] * data[i];
26 for (i = 0; i <
count; i++) {
27 dev2 = dev2 + (data[i] - stats->
mean) * (data[i] - stats->
mean);
28 dev = dev + (data[i] - stats->
mean);
31 stats->
var = (dev2 - (dev * dev / stats->
count)) / stats->
count;
37 void AS_eqdrt(
double vectx[],
double vecty[],
int i1,
int i2,
double *vabc)
39 double bn = 0, bd = 0, x1 = 0, y1 = 0;
56 vabc[0] = y1 - vabc[1] * x1;
62 G_debug(3,
"Points are equal\n");
void AS_eqdrt(double vectx[], double vecty[], int i1, int i2, double *vabc)
void AS_basic_stats(double *data, int count, struct GASTATS *stats)
int G_debug(int, const char *,...) __attribute__((format(printf