Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change an error message when running a certain command and the elliptic curve database is too small #2020

Closed
williamstein opened this issue Jan 31, 2008 · 4 comments

Comments

@williamstein
Copy link
Contributor

In the session below the command fails because the optional LARGE Cremona elliptic curves database is not installed (it works fine if it is). The error message should clearly say why the failure occurs, instead of Sage mysteriously bombing out.

sage@modular:~$ build/sage-2.10.1.rc3/sage
----------------------------------------------------------------------
| SAGE Version 2.10.1.rc3, Release Date: 2008-01-30                  |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage: EllipticCurve('14a4').sha().an(use_database=True)
---------------------------------------------------------------------------
<type 'exceptions.AttributeError'>        Traceback (most recent call last)

/home2/sage/<ipython console> in <module>()

/home2/sage/build/sage-2.10.1.rc3/local/lib/python2.5/site-packages/sage/schemes/elliptic_curves/sha.py in an(self, use_database)
    148         if use_database:
    149             try:
--> 150                 self.__an = int(round(float(self.E.database_curve().db_extra[4])))
    151                 return self.__an
    152             except RuntimeError, AttributeError:

<type 'exceptions.AttributeError'>: 'EllipticCurve_rational_field' object has no attribute 'db_extra'

Component: number theory

Issue created by migration from https://trac.sagemath.org/ticket/2020

@craigcitro
Copy link
Member

comment:2

Attachment: trac_2020.patch.gz

Looks good. (Actual review comments were in person, all taken care of.)

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Jan 24, 2009

comment:3

This patch exposes a numerical noise issue in sha_tate:

sage -t -long devel/sage/sage/schemes/elliptic_curves/sha_tate.py
**********************************************************************
File "/scratch/mabshoff/sage-3.3.alpha2/devel/sage-main/sage/schemes/elliptic_curves/sha_tate.py", line 157:
    sage: E.sha().an()
Expected:
    0.999999999999998
Got:
    1.00000000000000
**********************************************************************

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin changed the title change an error message when running a certain command and the elliptic curve database is too small [needs doctest fix] change an error message when running a certain command and the elliptic curve database is too small Jan 24, 2009
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Jan 24, 2009

comment:4

I was wrong, the above is not caused by this patch.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin changed the title [needs doctest fix] change an error message when running a certain command and the elliptic curve database is too small change an error message when running a certain command and the elliptic curve database is too small Jan 24, 2009
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Jan 24, 2009

comment:5

Merged in Sage 3.3.alpha2

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Jan 24, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants