Browse thread
Re: [Caml-list] Integer arithmetic: mod
- Krishnaswami, Neel
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Krishnaswami, Neel <neelk@c...> |
| Subject: | Re: [Caml-list] Integer arithmetic: mod |
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