Opened 6 years ago

Closed 5 years ago

#16781 closed defect (fixed)

Implementation of floordiv is incorrect for polynomials over finite fields

Reported by: cremona Owned by:
Priority: major Milestone: sage-7.1
Component: algebra Keywords: polynomial division
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: bca94fc (Commits) Commit: bca94fce831315fc88cc96ceb709977beb8d99fe
Dependencies: #2034 Stopgaps:

Description (last modified by jdemeyer)

As reported on sage-devel, the following is incorrect:

sage: F = GF(47)
sage: x = polygen(F)
sage: u = F(1)
sage: x//u

since x//u should give the quotient after dividing x by u.

This is fixed by #2034, so this ticket just adds a doctest.

Change History (9)

comment:1 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:2 Changed 5 years ago by jdemeyer

  • Dependencies set to #2034

comment:3 Changed 5 years ago by jdemeyer

  • Description modified (diff)

comment:4 Changed 5 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/16781

comment:5 Changed 5 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Commit set to 227e8bb44495a733a82f453b57601868c757ed96
  • Milestone changed from sage-6.4 to sage-7.1
  • Status changed from new to needs_review

New commits:

5e8a5e3Implement __floordiv__ in the coercion model
227e8bbAdd doctest for floor division

comment:6 Changed 5 years ago by vdelecroix

  • Reviewers set to Vincent Delecroix

Could you be more careful with

sage: 1 // x

and actually test the parent of the "0" you got?

comment:7 Changed 5 years ago by git

  • Commit changed from 227e8bb44495a733a82f453b57601868c757ed96 to bca94fce831315fc88cc96ceb709977beb8d99fe

Branch pushed to git repo; I updated commit sha1. New commits:

bca94fcDoctest also the parent of floor division

comment:8 Changed 5 years ago by vdelecroix

  • Status changed from needs_review to positive_review

comment:9 Changed 5 years ago by vbraun

  • Branch changed from u/jdemeyer/ticket/16781 to bca94fce831315fc88cc96ceb709977beb8d99fe
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.