Re: modulo operation

2005-02-25 Thread Thomas Lenherr
Hi Jigal, Hi Peter, first of all: it's true, the wikipedia-site is not contradicting the mysql-implementation, it seems i didn't read it too carefully... The guy who "invented" the modulo-operation was G.F. Gauss in his book "Disquisitiones Arithmeticae" wh

Re: modulo operation

2005-02-25 Thread Jigal van Hemert
From: "Peter Brawley" > There are various interpretations of modulo. It's not simply > "remainder", eg see the discussion at > http://mathforum.org/library/drmath/view/52343.html including this chart > from the 1983 Ada manual: The article at wikipedia already mentioned multiple interpretations.

Re: modulo operation

2005-02-25 Thread Peter Brawley
a special reason for the mathematically incorrect implementation of the modulo-operation in mysql. Using a correct modulo operation on a negative number would still result in a positive number: -1 % 2 == 1 (mysql: -1) -5 % 3 == 1 (mysql: -2) -1 % 4 == 3 (mysql: -1) (For the exact definition see htt

Re: modulo operation

2005-02-25 Thread Jigal van Hemert
From: "Thomas Lenherr" Hi Thomas, > I just wanted to know if there is a special reason for the > mathematically incorrect implementation of the modulo-operation in mysql. > Using a correct modulo operation on a negative number would still result > in a positive number: >

modulo operation

2005-02-24 Thread Thomas Lenherr
Hi, I just wanted to know if there is a special reason for the mathematically incorrect implementation of the modulo-operation in mysql. Using a correct modulo operation on a negative number would still result in a positive number: -1 % 2 == 1 (mysql: -1) -5 % 3 == 1 (mysql: -2) -1 % 4 == 3