[issue28021] Calculating wrong modulus manually

Xiang Zhang report at bugs.python.org
Thu Sep 8 10:33:44 EDT 2016


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>
_______________________________________


More information about the Python-bugs-list mailing list