From 815026b6fee2b2651606f0c23cdaf3c12483f789 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Wed, 10 Jul 2024 09:08:39 +0200 Subject: [PATCH] Support ECM 7.0.6 --- src/sage/interfaces/ecm.py | 1 - src/sage/libs/libecm.pyx | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sage/interfaces/ecm.py b/src/sage/interfaces/ecm.py index 99287dec718..98011970404 100644 --- a/src/sage/interfaces/ecm.py +++ b/src/sage/interfaces/ecm.py @@ -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 diff --git a/src/sage/libs/libecm.pyx b/src/sage/libs/libecm.pyx index 886a9b816e4..83fb7adaf8d 100644 --- a/src/sage/libs/libecm.pyx +++ b/src/sage/libs/libecm.pyx @@ -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 @@ -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)