Classification of poles and evaluating residues at poles of different orders.