From: Michael Ulm Date: 2006-08-11T18:16:21+09:00 Subject: Re: Confused by Bignum#remainder Chris Gehlker wrote: --snip-- > > A couple of years ago I took a discrete math course and was very > surprised to find division defined as: > > "Let a be an integer and d a *positive* integer. Then there are unique > integers q and r, with 0 .le. r .le d, such that a = dq + r. > Apparently my elementary school teacher had lied to me by saying that > division was even defined for a non-positive divisor. Furthermore, an > examination of the above definition will show that my calculator has > always lied to me for negative dividends since the remainder must by > definition be non-negative. --snip-- You do not understand the difference between a theorem and a definition. The statement you quote is a theorem. It does not define division but states a property of the integers. This property as stated holds if the assumptions of the theorem (d is a positive integer) hold. This theorem then can be used to define the modulo function. -- Michael Ulm R&D Team ISIS Information Systems Austria tel: +43 2236 27551-219, fax: +43 2236 21081 e-mail: michael.ulm@isis-papyrus.com Visit our Website: www.isis-papyrus.com --------------------------------------------------------------- This e-mail is only intended for the recipient and not legally binding. Unauthorised use, publication, reproduction or disclosure of the content of this e-mail is not permitted. This email has been checked for known viruses, but ISIS accepts no responsibility for malicious or inappropriate content. ---------------------------------------------------------------