Opened 10 years ago

Closed 10 years ago

#5919 closed defect (fixed)

[with patch, positive review] bug in conversion of polys over GF(2,e) from NTL to singular

Reported by: cremona Owned by: tbd
Priority: major Milestone: sage-3.4.2
Component: algebra Keywords: polynomial finite field
Cc: AlexGhitza, malb Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

In 3.4.2.alpha0 we have

sage: F.<a> = GF(2^16)
sage: R.<x, y> = F[]
sage: R({(1,2):1})
0*x*y^2

which Alex Ghitza tracked down to a line in libs/singular/singular.pyx and which I fixed by replacing one character in that line from 'i' to '0'. After that:

sage: sage: F.<a> = GF(2^16)
sage: sage: R.<x, y> = F[]
sage: sage: R({(1,2):1})
x*y^2

and hence also

sage: Fx.<b>=GF(2^(4*5))
sage: Ex=EllipticCurve(Fx,[0,0,1,1,1])
sage: Ex.defining_polynomial()
x^3 + y^2*z + x*z^2 + y*z^2 + z^3

which was not working properly (as reported to sage-devel).

Attachments (1)

12097.patch (684 bytes) - added by cremona 10 years ago.
applies to 3.4.2.alpha0

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by cremona

applies to 3.4.2.alpha0

comment:1 Changed 10 years ago by malb

  • Summary changed from [with patch, needs review] bug in conversion of polys over GF(2,e) from NTL to singular to [with patch, positive review] bug in conversion of polys over GF(2,e) from NTL to singular

Patch looks good.

comment:2 Changed 10 years ago by cremona

Thanks -- I did not add a doctest, since the function in which the bug was is a long way (it seems) from the user level where the above examples make sense.

Specifically, the bug is in the cdef function Conversion.*sa2si_GFqNTLGF2E(self, FiniteField_ntl_gf2eElement elem, ring *_ring) which has an empty docstring!

comment:3 Changed 10 years ago by mabshoff

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

Merged in Sage 3.4.2.rc0.

Cheers,

Michael

Note: See TracTickets for help on using tickets.