normalized_diff_ind function

Calculate a normalized difference.