Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2849 closed defect (fixed)

[with patch, positive review] Bug in elliptic curve cardinality for j=0 in char. 3

Reported by: cremona Owned by: cremona
Priority: major Milestone:
Component: number theory Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

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.

Attachments (2)

trac2849.patch (957 bytes) - added by cremona 12 years ago.
trac2849_doctest.patch (938 bytes) - added by AlexGhitza 12 years ago.
apply after trac2849.patch

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by cremona

comment:1 Changed 12 years ago by cremona

  • Summary changed from Bug in elliptic curve cardinality for j=0 in char. 3 to [with patch, needs review -- quick!] Bug in elliptic curve cardinality for j=0 in char. 3

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!

Changed 12 years ago by AlexGhitza

apply after trac2849.patch

comment:2 follow-up: Changed 12 years ago by AlexGhitza

  • Summary changed from [with patch, needs review -- quick!] Bug in elliptic curve cardinality for j=0 in char. 3 to [with patch, positive review] Bug in elliptic curve cardinality for j=0 in char. 3

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.

comment:3 Changed 12 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:4 in reply to: ↑ 2 Changed 12 years ago by cremona

Replying to AlexGhitza:

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.

Note: See TracTickets for help on using tickets.