Can someone explain this?

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

I would expect the second result to be the same as the first, as an
exact division.  And over (for example) Q, it works as expected:

sage: F = QQ
sage: x = polygen(F)
sage: u = F(1)
sage: x/u
x
sage: x//u
x

Bug?  I found out that the real name of the // operator is __floordiv,
and in the first example x.__floordiv?? displays the code, which
appears to tell me that when the two operands are of different types
(as here), the function bin_op(self, right, operator.mod) is returned.
The "operator.mod" looks like the culprit!

John

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to