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" which was published in 1801. His definiti

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
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 relations between integer division, remainder, and modulus are illustrated by the follo

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: > -1 % 2 == 1 (mysql: -1)