Opened 13 years ago

Closed 13 years ago

#3428 closed defect (fixed)

[with patch, with positive review] univariate polynomial quo_rem 0 trouble

Reported by: burcin Owned by: somebody
Priority: major Milestone: sage-3.0.4
Component: basic arithmetic Keywords: editor_craigcitro
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Attached patch fixes this:

sage: R.<x> = ZZ[]
sage: 0//(2*x)
---------------------------------------------------------------------------
ArithmeticError                           Traceback (most recent call last)

...
/home/burcin/work/sage/sage-3.0.2/polynomial_integer_dense_ntl.pyx in sage.rings.polynomial.polynomial_integer_dense_ntl.Polynomial_integer_dense_ntl.quo_rem (sage/rings/polynomial/polynomial_integer_dense_ntl.cpp:4638)()

ArithmeticError: division not exact in Z[x] (consider coercing to Q[x] first) 

Attachments (2)

univariate_poly_quo_rem_zero.patch (1.3 KB) - added by burcin 13 years ago.
univariate poly quo_rem zero handling fix
trac-3428-doctest.patch (806 bytes) - added by craigcitro 13 years ago.
apply after Burcin's patch

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by burcin

univariate poly quo_rem zero handling fix

comment:1 Changed 13 years ago by craigcitro

  • Keywords editor_craigcitro added
  • Summary changed from [with patch, needs review] univariate polynomial quo_rem 0 trouble to [with patch, under review by ncalexan before 6/20] univariate polynomial quo_rem 0 trouble

comment:2 Changed 13 years ago by burcin

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

This won't be necessary when #2357 is merged. I suggest we resolve this with wontfix.

comment:3 Changed 13 years ago by craigcitro

  • Resolution fixed deleted
  • Status changed from closed to reopened

However, we're not going to kill the NTL interface, so this should still be fixed.

comment:4 Changed 13 years ago by craigcitro

  • Summary changed from [with patch, under review by ncalexan before 6/20] univariate polynomial quo_rem 0 trouble to [with patch, with positive review] univariate polynomial quo_rem 0 trouble

Looks good. I added one additional doctest to make sure that the exact failure reported is now doctested.

Review by craigcitro and ncalexan.

Changed 13 years ago by craigcitro

apply after Burcin's patch

comment:5 Changed 13 years ago by mabshoff

  • Milestone changed from sage-3.1.1 to sage-3.0.4
  • Resolution set to fixed
  • Status changed from reopened to closed

Merged in Sage 3.0.4.alpha0

Note: See TracTickets for help on using tickets.