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

Bug in elliptic curve cardinality for j=0 in char. 3 #2849

Closed
JohnCremona opened this issue Apr 7, 2008 · 6 comments
Closed

Bug in elliptic curve cardinality for j=0 in char. 3 #2849

JohnCremona opened this issue Apr 7, 2008 · 6 comments

Comments

@JohnCremona
Copy link
Member

Dustin Moody reported

    While working on some things, I found a bug in SAGE:

 sage:k.<a>=GF(3^5)

 sage:E=EllipticCurve(k,[-1,-1])

 sage:E.trace_of_frobenius()
 0

 This isn't correct.  It should be -27.  I also discovered you can get
around it.

 sage:E.cardinality_exhaustive()
 271

 sage:E.trace_of_frobenius()
 -27

 Somehow, doing .cardinality_exhaustive() fixes the bug.

Component: number theory

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

@JohnCremona
Copy link
Member Author

Attachment: trac2849.patch.gz

@JohnCremona
Copy link
Member Author

comment:1

Here's the patch: A case where q=3 (mod 4) only worked for p>3 and was being used for p=3, odd degree. Should be a trivial review.

Note that I am in the middle of implementing vastly better support for the cases j=0 and j=1728, which are not so straightforward in characterisitcs 2 and 3 but I am getting there!

@JohnCremona JohnCremona changed the title Bug in elliptic curve cardinality for j=0 in char. 3 [with patch, needs review -- quick!] Bug in elliptic curve cardinality for j=0 in char. 3 Apr 7, 2008
@aghitza
Copy link

aghitza commented Apr 7, 2008

apply after trac2849.patch

@aghitza
Copy link

aghitza commented Apr 7, 2008

comment:2

Attachment: trac2849_doctest.patch.gz

Looks fine and it fixes the issue. I've added a mini-patch that puts in a doctest demonstrating the fixed status.

Apply both patches.

@aghitza aghitza changed the title [with patch, needs review -- quick!] Bug in elliptic curve cardinality for j=0 in char. 3 Bug in elliptic curve cardinality for j=0 in char. 3 Apr 7, 2008
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Apr 7, 2008

comment:3

Merged trac2849.patch and trac2849_doctest.patch in Sage 3.0.alpha3

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Apr 7, 2008
@JohnCremona
Copy link
Member Author

comment:4

Replying to @aghitza:

Looks fine and it fixes the issue. I've added a mini-patch that puts in a doctest demonstrating the fixed status.

Thanks, Alex -- I should have done that but only remembered after uploading the patch.

Apply both patches.

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