g10: Correctly compute the euclidean distance.