Re: Modulo n arithmetics (Piercarlo Grandi)
Sun, 29 Nov 1992 21:24:59 GMT

          From comp.compilers

Related articles
[3 earlier articles]
Re: Modulo n arithmetics (1992-11-11)
Modulo n arithmetics (1992-11-11)
Re: Modulo n arithmetics wendt@CS.ColoState.EDU (1992-11-15)
Re: Modulo n arithmetics (1992-11-17)
Re: Modulo n arithmetics (1992-11-19)
Re: Modulo n arithmetics tve@crackle.CS.Berkeley.EDU (1992-11-20)
Re: Modulo n arithmetics (1992-11-29)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Piercarlo Grandi)
Organization: Prifysgol Cymru, Aberystwyth
Date: Sun, 29 Nov 1992 21:24:59 GMT
Keywords: arithmetic
References: 92-11-029 92-11-113

Christian Fabre writes:
> I am wondering if any languages or application heavily
> rely on modulo arithmetics: (Chris Johnston) responded:
> Some applications...

> How about communication, TCP uses 32bit counters to sequence
> packets, the packet following 32 ones is zero. Trading
> (stocks/futures) cards are numbered 000 to 999. Database rows...
> Any counter that can wrap to zero.

As to languages, it is often forgotten that in C the various length of the
'unsigned' type have radically different semantics from the various
lengths of the 'int' type, as they obey the rules of arithmetic mod 2^N (N
is the number of bits for the representation of that length of
Piercarlo Grandi | JNET:
Dept of CS, University of Wales | UUCP: ...!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET:


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.