![]() | 1 | initial version |
Nowadays, the IntegerMod_abstract
class has a .lift_centered()
method to compute the "symmetric" or "centered" representative for a given residue class:
sage: [x.lift_centered() for x in Zmod(10)]
[0, 1, 2, 3, 4, 5, -4, -3, -2, -1]