Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Gene Wirchenko Newsgroups: comp.lang.java.programmer,comp.lang.c Subject: Re: Arithmetic overflow checking Date: Mon, 11 Jul 2011 15:55:17 -0700 Organization: A noiseless patient Spider Lines: 30 Message-ID: References: <2rydnez7l-H5BYnTnZ2dnUVZ_vGdnZ2d@earthlink.com> <9LWdnZH2hdfmyYvTnZ2dnUVZ_vidnZ2d@posted.palinacquisition> <3797038f-22d1-40b2-8c12-60db5a0976b8@t5g2000yqj.googlegroups.com> <1d742049-31f6-4eb6-8832-9cce3f25091d@a31g2000vbt.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: mx04.eternal-september.org; posting-host="7Qrvczazr82YckO5XW8Vtw"; logging-data="16315"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0WJ2+qRqbC/v0ruRApPaumRqFun65AHo=" X-Newsreader: Forte Agent 4.2/32.1118 Cancel-Lock: sha1:royJLLiC4jB3bPr9NSD9UF1Db1c= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6092 comp.lang.c:8144 On Mon, 11 Jul 2011 14:54:22 -0700 (PDT), tm wrote: >On 11 Jul., 16:58, Gene Wirchenko wrote: [snip] >>      Most of the time, the speed is not required.  I will take >> slightly slower, correct results over fast, possibly wrong results. > >It is not always necessary to pay for correct results >with a slowdown. This is not a surprise to me. If there is a slowdown, I am often willing to pay that cost. >Correct results can be computed without any slowdown, >when the CPU is able to trigger an overflow interupt. Even if the CPU does not have this facility, I still want correct answers. >A slowdown would only happen when an overflow occurs. >Computations without overflow would run at full speed. Even more reason to not avoid such checking. Sincerely, Gene Wirchenko