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:  sage7.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 )
As reported on sagedevel, the following is incorrect:
sage: F = GF(47) sage: x = polygen(F) sage: u = F(1) sage: x//u 0
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
 Milestone changed from sage6.3 to sage6.4
comment:2 Changed 5 years ago by
 Dependencies set to #2034
comment:3 Changed 5 years ago by
 Description modified (diff)
comment:4 Changed 5 years ago by
 Branch set to u/jdemeyer/ticket/16781
comment:5 Changed 5 years ago by
 Commit set to 227e8bb44495a733a82f453b57601868c757ed96
 Milestone changed from sage6.4 to sage7.1
 Status changed from new to needs_review
comment:6 Changed 5 years ago by
 Reviewers set to Vincent Delecroix
Could you be more careful with
sage: 1 // x 0
and actually test the parent of the "0" you got?
comment:7 Changed 5 years ago by
 Commit changed from 227e8bb44495a733a82f453b57601868c757ed96 to bca94fce831315fc88cc96ceb709977beb8d99fe
Branch pushed to git repo; I updated commit sha1. New commits:
bca94fc  Doctest also the parent of floor division

comment:8 Changed 5 years ago by
 Status changed from needs_review to positive_review
comment:9 Changed 5 years ago by
 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.
New commits:
Implement __floordiv__ in the coercion model
Add doctest for floor division