Install & Compatibility
Where this runs
tested against v10.6.48 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.13
✕ build_error
✕ build_error
250MB installed
● package 250MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
find_factor
✓ from passagemath_libecm import find_factor
✗ from passagemath.libecm import find_factor
Basic usage: attempt integer factorization with ECM using the find_factor function.
from passagemath.libecm import find_factor
# Factor a composite number
n = 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
B1 = 1000000
B2 = 100000000
result = find_factor(n, B1, B2)
print('Found factor:' if result else 'No factor found')
Upgrade
Version history
10.8.4latest on PyPI · released Apr 20, 2026
Audit
Dependencies
gmpy2requiredRequired for MPZ arithmetic used in the ECM implementation.
passagemath-sageoptionalOften used side-by-side for number theory; not strictly required.