9 double sum = 0, sumsq = 0, sumabs = 0;
10 double dev = 0, dev2 = 0;
14 stats->
max = data[count - 1];
16 for (i = 0; i <
count; i++) {
18 sumabs += fabs(data[i]);
19 sumsq += data[i] * data[i];
27 for (i = 0; i <
count; i++) {
28 dev2 = dev2 + (data[i] - stats->
mean) * (data[i] - stats->
mean);
29 dev = dev + (data[i] - stats->
mean);
33 stats->
var = (dev2 - (dev * dev / stats->
count)) / stats->
count;
40 void AS_eqdrt(
double vectx[],
double vecty[],
int i1,
int i2,
double *vabc)
42 double bn = 0, bd = 0, x1 = 0, y1 = 0;
59 vabc[0] = y1 - vabc[1] * x1;
65 G_debug(3,
"Points are equal\n");
void AS_basic_stats(double *data, int count, struct GASTATS *stats)
void AS_eqdrt(double vectx[], double vecty[], int i1, int i2, double *vabc)
int G_debug(int, const char *,...) __attribute__((format(printf