make complex norm use hypot to eliminate redundant code