[pypy-issue] [issue792] builtin pow() gives wrong answer
Justin Peel
tracker at bugs.pypy.org
Wed Jul 13 10:13:35 CEST 2011
New submission from Justin Peel <peelpy at gmail.com>:
By doing a simple comparison with the Python version of rbitint.py's counterpart
in CPython, the only difference that I can see is that the constant SHIFT
(PyLong_SHIFT in CPython) is defined as 31 in pypy and 30 or 15 in CPython
depending on whether 64-bit integers are supported. I haven't taken the time to
test if changing the SHIFT value will fix this or not and don't claim to
understand the 5-ARY exponentiation algorithm, but it is the only discrepancy
that I could find between the codes.
----------
nosy: +justinpeel
status: unread -> chatting
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue792>
________________________________________
More information about the pypy-issue
mailing list