Opened 7 years ago

Closed 7 years ago

#1406 closed defect (fixed)

[with patch] bug in coercion of multivariate polynomials (possibly libsingular related)

Reported by: was Owned by: mhansen
Priority: major Milestone: sage-2.9
Component: basic arithmetic Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

Reducing a polynomial to the libsingular polynomials to GF(pn) is buggy as the following examples all illustrate.

sage: R.<x,y> = QQ[]
sage: S.<xx,yy> = GF(5)[]
sage: S(5*x*y + x + 17*y)
0*xx*yy + xx + 2*yy
sage: R.<x,y> = ZZ[]
sage: S.<xx,yy> = GF(5)[]
sage: R.<x,y> = ZZ[]
sage: S.<xx,yy> = GF(25,'a')[]
sage: S(5*x*y + x + 17*y)
0*xx*yy + xx + 2*yy
sage: type(S(5*x*y + x + 17*y))
<type 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'>
sage: R.<x,y> = ZZ[]
sage: S.<xx,yy> = Integers(5)[]
sage: S(5*x*y + x + 17*y)
xx + 2*yy

Attachments (2)

1406.patch (2.1 KB) - added by mhansen 7 years ago.
trac-1406.patch (2.6 KB) - added by was 7 years ago.
This is a -- I think -- better version of the 1406.patch that mhansen attached -- use it instead.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by mhansen

  • Owner changed from somebody to mhansen
  • Status changed from new to assigned

I have a fix for this, but it causes a segfault in the testing of multi_polynomial_ideal.py .

--Mike

Changed 7 years ago by mhansen

comment:2 Changed 7 years ago by mhansen

  • Summary changed from bug in coercion of multivariate polynomials (possibly libsingular related) to [with patch] bug in coercion of multivariate polynomials (possibly libsingular related)

Changed 7 years ago by was

This is a -- I think -- better version of the 1406.patch that mhansen attached -- use it instead.

comment:3 Changed 7 years ago by was

Bonus -- my patch doesn't cause segfaults in multi_polynomial_ideal.py... I think.

comment:4 Changed 7 years ago by mhansen

Actually, it turns out that that segfault was there all along (with or without the patch). See #1409 .

comment:5 Changed 7 years ago by mabshoff

Ok, looks good to me, merging William's patch.

Cheers,

Michael

comment:6 Changed 7 years ago by mabshoff

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

Merged in 2.9.alpha1.

Note: See TracTickets for help on using tickets.