Skip to content

Commit

Permalink
sagemathgh-38344: Support ECM 7.0.6
Browse files Browse the repository at this point in the history
    
Two breaking changes:

- The `-I` option has been removed https://gitlab.inria.fr/zimmerma/ecm/
-/commit/df9dd6fc43852868455a390aed5c8ab4974ee2a1
- Factoring 1 now throws an error https://gitlab.inria.fr/zimmerma/ecm/-
/commit/7c29926c3902c34bbccde21eb9d02624dc991dfc
    
URL: sagemath#38344
Reported by: Antonio Rojas
Reviewer(s): Gonzalo Tornaría, Matthias Köppe
  • Loading branch information
Release Manager committed Jul 20, 2024
2 parents ac80949 + 815026b commit f563ae8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/sage/interfaces/ecm.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ def _find_factor(self, n, factor_digits, B1, **kwds):
"""
n = self._validate(n)
kwds.setdefault('c', 1000000000)
kwds.setdefault('I', 1)
if factor_digits is not None:
B1 = self.recommended_B1(factor_digits)
kwds['one'] = True
Expand Down
10 changes: 6 additions & 4 deletions src/sage/libs/libecm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,13 @@ def ecmfactor(number, double B1, verbose=False, sigma=0):
Some special cases::
sage: ecmfactor(1, 100)
(True, 1, ...)
Traceback (most recent call last):
...
ValueError: Input number (1) must be greater than 1
sage: ecmfactor(0, 100)
Traceback (most recent call last):
...
ValueError: Input number (0) must be positive
ValueError: Input number (0) must be greater than 1
"""
cdef mpz_t n, f
cdef int res
Expand All @@ -165,8 +167,8 @@ def ecmfactor(number, double B1, verbose=False, sigma=0):
sage_int_number = Integer(number)
sage_int_sigma = Integer(sigma)

if number <= 0:
raise ValueError("Input number (%s) must be positive"%number)
if number <= 1:
raise ValueError("Input number (%s) must be greater than 1"%number)

if verbose:
print("Performing one curve with B1=%1.0f" % B1)
Expand Down

0 comments on commit f563ae8

Please sign in to comment.