A Versatile Residue Numbering