Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 19 May 2011 07:52:40 -0500 Date: Thu, 19 May 2011 05:52:29 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: About using assertion References: <92r0e9F6lvU1@mid.individual.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 13 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 75.8.126.96 X-Trace: sv3-ZlkbJ0l33W0SuGXjotm7nWR78hDBy0tYiXLZxYZaRPmWloYCLAqCulQKEqYU4Xm3+nLmleqF9cTDon0!UAHeqhivbFWu5RribO4PrYXkazeJErHwf7L08wiQ/8N1Vd7UcixanvqIfVb2eGKdaKvFLsv5noGs!OA2a2Sw+dgFsCXLFpJvGW9LK6kZylN21bWTqD7vRUK8= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1794 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4292 On 5/18/2011 10:32 PM, Tim McDaniel wrote: ... > (As a tangent, I'm not sure whether "Foo.sqrt(-0.0)" should throw an > exception or not.) For what it is worth, Math.sqrt returns 0 for positive or negative zero input. Negative zero is a strange beast. As far as I can tell, it exists mainly to produce negative infinity when it is used as a divisor. For example, it is equal to zero for comparison purposes. Patricia