Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Integer arithmetic: mod
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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 [] 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 

Neel Krishnaswami
Bug reports:  FAQ:
To unsubscribe, mail  Archives: