49 for (
int i = 0; i < nb; i++) {
51 see += array[i] * array[i];
54 return (see / nb - me * me);
70 for (
int i = 0; i < nb; i++) {
71 me += (float)array[i];
72 see += (float)(array[i] * array[i]);
75 return (see / nb - me * me);
static int32_t variance_int(int32_t *array, int nb)
Compute the variance of an array of values (integer).
static float variance_float(float *array, int nb)
Compute the variance of an array of values (float).