Xiang Zhang added the comment: You should use a//b instead of int(a/b). >>> 11**19 - 11**19//23*23 15 >>> 11**19 - int(11**19/23)*23 1395 ---------- nosy: +xiang.zhang _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue28021> _______________________________________