On 2016-01-19 22:50, Volker Braun wrote:
Presumably nobody has a problem with

sage: R.<x> = QQ[]
sage: (3*x^2+1) // (2*x)
3/2*x

and it would be rather strange if the binary operations on the scalars
behave different in QQ vs degree-0-part(QQ[x]).

Well, you cannot have a fully consistent floor division in any case: Either you make floor division on QQ consistent with ZZ or with QQ[x] but you cannot have both. Personally, I would prefer making it consistent with ZZ.

If E is any Euclidean domain, then you can extend // naturally to the fraction field of E. I think this is the most useful definition. This would also be consistent with gcd() where we already treat QQ and QQ[x] differently:

sage: R.<x> = QQ[]
sage: gcd(QQ(2), QQ(2))
2
sage: gcd(R(2), R(2))
1

Of course we could just always answer "1" in both cases which would be mathematically correct but rather useless.


Jeroen.

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

Reply via email to