Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!l.cc.purdue.edu!cik From: cik@l.cc.purdue.edu (Herman Rubin) Newsgroups: comp.lang.c Subject: Re: checking for overflow in C Summary: Why not use overflows? Message-ID: <1292@l.cc.purdue.edu> Date: 8 May 89 13:55:35 GMT References: <13367@dartvax.Dartmouth.EDU> <10218@smoke.BRL.MIL> Organization: Purdue University Statistics Department Lines: 22 In article <10218@smoke.BRL.MIL>, gwyn@smoke.BRL.MIL (Doug Gwyn) writes: > In article <13367@dartvax.Dartmouth.EDU> shallit@eleazar.dartmouth.edu (Jeffrey Shallit) writes: < <... enlighten me about the officially approved way of checking overflow when < > Patient: Doctor, it hurts when I do this. > Doctor: Don't do that! > > You're looking for tactics when what is needed is better strategy. > How did you get your algorithm into the state where an overflow is > even possible? Sounds to me like the algorithm needs to be better > engineered. Are you that certain that the algorithm using overflow is not better engineered than the one that does not? By better engineered, I mean that it runs faster. If it is on the machine, it should be available for use. -- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907 Phone: (317)494-6054 hrubin@l.cc.purdue.edu (Internet, bitnet, UUCP)