an class="o">++) n_observations += values[i]; expected_frequency = (1.0 / (f64) len) * (f64) n_observations; d = 0.0; for (i = 0; i < len; i++) { actual_frequency = ((f64) values[i]); delta_d = ((actual_frequency - expected_frequency) * (actual_frequency - expected_frequency)) / expected_frequency; d += delta_d; } return d; } /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */