Hello,
While responding to this ask question
http://ask.sagemath.org/question/31740/why-112321-and-111320
I discovered some inconsistencies with the modulo operators in Sage. We
indeed have three coexisting definitions for x % y
1) the unique x' between [0,y) of the form x + ny (used when both x
and y are integers)
2) the unique x' between (-y/2, y/2] of the form x+ny (used when x is
a float)
3) the result of an operation in Zmod(y) and a lift to {0, ..., y-1}
(used when x is a rational and y a float)
I would suggest to always use 1) but I am not sure if my opinion is
shared by many mathematicians and Sage programmers...
Best,
Vincent
--
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.