Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in conversion from python int to ZZ (python 3.11, 32 bit)
This affects 32 bit architectures, where the representation of python integers changed in cpython 3.11. As part of sagemath#33842, the function `sage.arith.long.integer_check_long_py()` was rewritten to support the new representation. Unfortunately a bug remains for the conversion of integers between 2^60 and 2^63-1. This manifests in lots of doctests failing, but a quick way to demonstrate the issue is sage: ZZ ( int(1152921504606847018) ) # 2^60 + 42 42 The function `integer_check_long_py()` has good unit testing, checking values around the word size, but this range was missing. This commit adds a simple fix and new test cases for a few integers in this range.
- Loading branch information