[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions about srfi-77 Generic Arithmetic

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.

On Feb 18, 2006, at 11:22 AM, William D Clinger wrote:

8.  Integer Divison.
(a) I think it is a really bad design to have the basic
operation of div+mod change when the second argument changes sign.

I don't have much problem with that.  These mathematical
operations aren't defined at zero, so they have to compare
against zero anyway.  To quote Egner et al, "the sign of
the modulus y determines which system of representatives
of the residue class ring Z/yZ is being chosen, either
non-negative (y > 0), symmetric around zero (y < 0), or
the integers (y = 0)."  Using the sign of y is ad hoc,
but it's an ad hoc choice anyway.

For now, let me just point out


where either you pulled one over on me that I didn't realize, or you didn't know what MODULO meant in 1996. I think introducing this operator will make things very much worse.