Re: [sage-devel] modulo operators (integers, rationals, real numbers)

2015-12-22 Thread 'Martin R. Albrecht' via sage-devel
Hi sage-devel, I think 1) should be the default but I find myself needing 2) quite a bit these days (also for integers) Cheers, Martin Vincent Delecroix writes: > Hello, > > While responding to this ask question > > http://ask.sagemath.org/question/31740/why-112321-and-111320 > > I discovered so

Re: [sage-devel] modulo operators (integers, rationals, real numbers)

2015-12-22 Thread Daniel Krenn
On 2015-12-22 00:31, Vincent Delecroix wrote: > 1) the unique x' between [0,y) of the form x + ny (used when both x > and y are integers) +1 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving email

Re: [sage-devel] modulo operators (integers, rationals, real numbers)

2015-12-22 Thread Jeroen Demeyer
On 2015-12-22 09:59, Jori Mäntysalo wrote: Other option would be to remove it for non-integer arguments. -1 Modulo can be useful for floating-point numbers and it makes sense mathematically. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To

Re: [sage-devel] modulo operators (integers, rationals, real numbers)

2015-12-22 Thread Jori Mäntysalo
On Mon, 21 Dec 2015, Vincent Delecroix wrote: 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

[sage-devel] modulo operators (integers, rationals, real numbers)

2015-12-21 Thread Vincent Delecroix
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