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

*To*: sebastian.egner@xxxxxxxxxxx, srfi-77@xxxxxxxxxxxxxxxxx, will@xxxxxxxxxxx*Subject*: Re: Integer residue-classes [was: Questions about srfi-77 Generic Arithmetic]*From*: William D Clinger <will@xxxxxxxxxxx>*Date*: Tue, 21 Feb 2006 11:08:27 -0500*Cc*: lucier@xxxxxxxxxxxxxxx*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx

Oops! I wrote: > ....Another way > to see that the definitions of div and mod in SRFI 77 > are ad hoc is to observe that > > > (2) if m > 0: 0 <= (x mod m) < m > > if m = 0: (x mod m) = x > > if m < 0: m/2 <= (x mod m) < -m/2, and > > could be changed to > > (2) if m < 0: 0 <= (x mod m) < m > if m = 0: (x mod m) = x > if m > 0: m/2 <= (x mod m) < -m/2, and > > while preserving all of the important mathematical properties > you claimed for div and mod. That's insane, of course. I meant it could be changed to (2) if m < 0: 0 <= (x mod m) < -m if m = 0: (x mod m) = x if m > 0: -m/2 <= (x mod m) < m/2, and Will

- Prev by Date:
**Re: Integer residue-classes [was: Questions about srfi-77 Generic Arithmetic]** - Next by Date:
**Re: Integer residue-classes [was: Questions about srfi-77 Generic Arithmetic]** - Previous by thread:
**Re: Integer residue-classes [was: Questions about srfi-77 Generic Arithmetic]** - Next by thread:
**Re: Integer residue-classes [was: Questions about srfi-77 Generic Arithmetic]** - Index(es):