Pablo Acosta added the comment: Actually probably int(round(a%b)) would be better. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue21712> _______________________________________