The old fashioned gmp-ecm interface: sage: ecm.find_factor(2^2^7+1) [59649589127497217, 5704689200685129054721] sage: ecm.get_last_params() {'B1': '19929', 'B2': '3804582', 'poly': 'x^1', 'sigma': '1643647236'}
the proposed, new one: sage: import sage.libs.libecm sage: from sage.libs.libecm import ecmfactor sage: ecmfactor(Integer(2^2^7+1),19929,verbose=True) Performing one curve with B1=19929 Found no factor. (False, None) How can I obtain the old functionality? On 16 Gru, 19:49, "John Cremona" <john.crem...@gmail.com> wrote: > 2008/12/16 Robert Bradshaw <rober...@math.washington.edu>: > > > > > > > On Dec 16, 2008, at 7:47 AM, mabshoff wrote: > > >> On Dec 16, 7:44 am, "William Stein" <wst...@gmail.com> wrote: > > >> <SNIP> > > >>> I posted a patch there that does some error checking at least. It's > >>> minimal. I hope somebody will referee it asap so it can go in > >>> sage-3.2.2. > > >>> The real longterm solution to this problem is to totally rewrite the > >>> GMP interface so that it uses Cython and doesn't use expect at all. > >>> That's for another ticket. > > >> Thanks to Robert Miller that is already in Sage: > > >> sage: import sage.libs.libecm > >> sage: from sage.libs.libecm import ecmfactor > >> sage: result = ecmfactor(999, 0.00) > >> sage: result in [(True, 27), (True, 37), (True, 999)] > >> True > >> sage: result = ecmfactor(999, 0.00, verbose=True) > >> Performing one curve with B1=0 > >> Found factor in step 1: ... > >> sage: result in [(True, 27), (True, 37), (True, 999)] > >> True > > > Is there any reason we're still shipping the old interface? > > Lack of documentation? > > sage: import sage.libs.libecm > sage: from sage.libs.libecm import ecmfactor > sage: ecmfactor? > Type: builtin_function_or_method > Base Class: <type 'builtin_function_or_method'> > String Form: <built-in function ecmfactor> > Namespace: Interactive > > sage: ecmfactor(100) > --------------------------------------------------------------------------- > TypeError Traceback (most recent call last) > > /home/john/.mozilla/firefox/t7csk8yc.default/<ipython console> in <module>() > > /home/john/sage-3.2.2.alpha1/local/lib/python2.5/site-packages/sage/libs/libecm.so > in sage.libs.libecm.ecmfactor (sage/libs/libecm.c:1485)() > > TypeError: ecmfactor() takes at least 2 positional arguments (1 given) > > John > > > > > - Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---