On 19 January 2016 at 11:49, Vincent Delecroix
<20100.delecr...@gmail.com> wrote:
> As far as I know we do not have any specifications for //. In euclidean ring
> it would be natural for it to be the quotient. But in other situations?
>
> 1. Should we always have
>
>   a == a//b + a%b
>
> 2. Should // always be internal?
>
> Vincent
>
>
> On 19/01/16 08:28, Jeroen Demeyer wrote:
>>
>> Feature or bug?

I would say "feature" since these are field elements so division is
always exact, unlike ZZ(7)//ZZ(2).

>>
>> sage: QQ(7) // QQ(2)
>> 7/2
>>
>> I would expect
>>
>> sage: QQ(7) // QQ(2)
>> 3

This would only make sense if ZZ was the only ring of which QQ was the
field of fractions.  Similarly with rational function fields, in my
opinion.

But I think that

sage: QQ(7) % QQ(2)
1

is definitely a bug, for the same reason!  (Should be 0).

John

>>
>
> --
> 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.

-- 
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