Sun, 29 Nov 1992 21:24:59 GMT

Related articles |
---|

[3 earlier articles] |

Re: Modulo n arithmetics dneedham@oucsace.cs.ohiou.edu (1992-11-11) |

Modulo n arithmetics wchsieh@beethoven.lcs.mit.edu (1992-11-11) |

Re: Modulo n arithmetics wendt@CS.ColoState.EDU (1992-11-15) |

Re: Modulo n arithmetics johnr@ee.uts.edu.au (1992-11-17) |

Re: Modulo n arithmetics chris@gargoyle.uchicago.edu (1992-11-19) |

Re: Modulo n arithmetics tve@crackle.CS.Berkeley.EDU (1992-11-20) |

Re: Modulo n arithmetics pcg@aber.ac.uk (1992-11-29) |

Newsgroups: | comp.compilers |

From: | pcg@aber.ac.uk (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@gargoyle.uchicago.edu (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

'unsigned').

--

Piercarlo Grandi | JNET: pcg@uk.ac.aber

Dept of CS, University of Wales | UUCP: ...!aber-cs!pcg

Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@aber.ac.uk

--

Post a followup to this message

Return to the
comp.compilers page.

Search the
comp.compilers archives again.