Computing discrete residues of rational functions | Synapse