1) afc::mean() is made portable (it was not for signed integers);
2) code style is uniformed.