From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA10050; Mon, 19 Nov 2001 17:35:15 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA09626 for ; Mon, 19 Nov 2001 17:35:14 +0100 (MET) Received: from smtp2.cswv.com (smtp2.cswv.com [4.17.129.20]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fAJGZDb00330 for ; Mon, 19 Nov 2001 17:35:13 +0100 (MET) Received: from exchange1.cswv.com ([10.2.3.9]) by smtp2.cswv.com with Microsoft SMTPSVC(5.5.1877.197.19); Mon, 19 Nov 2001 11:35:06 -0500 Received: by exchange1.cswv.com with Internet Mail Service (5.5.2653.19) id ; Mon, 19 Nov 2001 11:39:09 -0500 Message-ID: From: "Krishnaswami, Neel" To: "'caml-list@inria.fr'" Subject: Re: [Caml-list] Integer arithmetic: mod Date: Mon, 19 Nov 2001 11:39:07 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Xavier Leroy [mailto:xavier.leroy@inria.fr] wrote: > > I'm favorable to providing proper Euclidean division and modulus as > library functions. The way I learned Euclidean division in college > is that the quotient q and the modulus r of a divided by b are > defined by > > a = b * q + r with 0 <= r < |b| > > Any mathematician on this list who could look it up in Bourbaki? I haven't checked Bourbaki, but this is my understanding as well. There's also a paper on the subject in the ACM TOPLAS from 1992. "The Euclidean definition of the functions div and mod", by Raymond Boute: http://portal.acm.org/citation.cfm?id=128862&coll=portal&dl=ACM&CFID=745503& CFTOKEN=75650609#FullText -- Neel Krishnaswami neelk@cswcasa.com ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr