Share normalize algorithm.