Skip to content

gh-123497: New limit for Python integers on 64-bit platforms#123725

Closed
serhiy-storchaka wants to merge 5 commits intopython:mainfrom
serhiy-storchaka:integer-upper-limit2
Closed

gh-123497: New limit for Python integers on 64-bit platforms#123725
serhiy-storchaka wants to merge 5 commits intopython:mainfrom
serhiy-storchaka:integer-upper-limit2

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Sep 5, 2024

Instead of be limited just by the size of addressable memory (2**63 bytes), Python integers are now also limited by the number of bits, so the number of bit now always fits in 64-bit integer.

Both limits are much larger than what can be available on practice, so there is no effect on users.

_PyLong_NumBits() and _PyLong_Frexp() are now always successful.

serhiy-storchaka and others added 5 commits August 30, 2024 13:52
Instead of be limited just by the size of addressable memory (2**63
bytes), Python integers are now also limited by the number of bits, so
the number of bit now always fit in 64-bit integer.

Both limits are much larger than what can be available on practice, so
there is no effect on users.

_PyLong_NumBits() and _PyLong_Frexp() are now always successful.
Co-authored-by: Victor Stinner <vstinner@python.org>
@serhiy-storchaka serhiy-storchaka deleted the integer-upper-limit2 branch September 5, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant