Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Closed
serhiy-storchaka wants to merge 5 commits into
python:mainpython/cpython:mainfrom
serhiy-storchaka:integer-upper-limit2serhiy-storchaka/cpython:integer-upper-limit2Copy head branch name to clipboard
Closed

gh-123497: New limit for Python integers on 64-bit platforms#123725
serhiy-storchaka wants to merge 5 commits into
python:mainpython/cpython:mainfrom
serhiy-storchaka:integer-upper-limit2serhiy-storchaka/cpython:integer-upper-limit2Copy head branch name to clipboard

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.