Skip to content

Commit

Permalink
Support ECM 7.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
antonio-rojas committed Jul 10, 2024
1 parent 543f8d6 commit 815026b
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 @@ -508,7 +508,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 @@ -149,11 +149,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 @@ -164,8 +166,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 815026b

Please sign in to comment.