id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
383,quo_rem in the polynomial rings does not use canonical coercion,jbmohler,somebody,"I'm looking at the polynomial function quo_rem and I see that it does it's own
coercion manually. This feels a little wrong to me. I think it should go
through the standard coercion routines. Here's a ""bug"" that results:
{{{
sage: x=ZZ['x'].0
sage: y=QQ['x'].0
sage: (y+1).quo_rem(1/2*x)
(2, 1)
sage: (x+1).quo_rem(1/2*y)
...
: no coercion of this rational to integer
}}}
The bug is that I don't see why these two things are treated substantially
differently. The reason I found this is because the simple ""TypeError""
exception did not provide the usual message about parents being
mis-matched -- I think this is a bug in itself
The fix for all that is to make the quo_rem stuff use canonical coercion model.
All of the quo_rem instances in sage/rings/polynomial/polynomial_element_generic.py suffer from some sort of coercion impropriety.",defect,closed,minor,sage-4.3.1,basic arithmetic,fixed,,,sage-4.3.1.rc2,Robert Bradshaw,William Stein,N/A,,,,,