getResidue(5) results in a compiler error since SignedSize and Size are an ambigous overload of getResidue which is no fun. I opt for a template here which does the right thing (TM)