Use hamming_distance in hamming_test and replace num::abs with num::FloatMath::abs_sub