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: Stanimir Stamenkov Newsgroups: comp.lang.java.programmer Subject: Re: Arithmetic overflow checking Date: Sat, 09 Jul 2011 16:34:38 +0300 Organization: A noiseless patient Spider Lines: 11 Message-ID: References: <015aeb15-57db-48ab-9cd4-77f8448b632f@w24g2000yqw.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 9 Jul 2011 13:34:30 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="9eTmrOoDkUZt4jkjN/OnZw"; logging-data="27387"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19lPop+QHgT5tyxLlI5fE9d" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110706 SeaMonkey/2.2 In-Reply-To: X-Face: )>>ChyF_H using a library or a set of functions by convention is error-prone, The set of library functions would just address the requirement of not cluttering the code. The error-proneness is usually addressed by writing appropriate unit tests which verify the code is dealing with overflow situations in expected manner. -- Stanimir