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

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.

*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):