Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!news1.google.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: Sat, 06 Aug 2011 23:32:33 -0500 Date: Sat, 06 Aug 2011 21:32:32 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: higher precision doubles References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 19 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.230.203.65 X-Trace: sv3-4SEEGOWXMWCc7PeFf+P+xaUr0tGa5N/6b7XsD/aS92ifMOx4HkrR6JvEy+3j4WCHht3HKPy/lezE/tj!9jXpyKkl/G7W/o6TSFmbocqnou4jwGYd8b2akq0IwDowA+ZbEv8TDtUQ3YXsdS2EywFb/WmXRAjr!Vh3dFhOALsoK/jnZACsBEbBxmnewje/t10NGCmewAvnsDw== 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: 2197 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6844 On 8/6/2011 4:34 PM, Jan Burse wrote: > Patricia Shanahan schrieb: >> What is your general strategy for dealing with rounding error in your > > The same strategy like ISO LIA is following. You have > the mathematical definition of sin, pi, etc.. And then > you have the machine objects SIN, PI, etc.. ... I was actually asking you what you were doing in your own program that requires Math.sin(2*Math.PI) to be exactly 0, and how that requirement fits with a general strategy for handling rounding error in your program. The relevant standards for this are the Java Language Specification, for the rounding rules, and the Java API, for the definition of Math.sin. The IEEE 754 standard is useful background. Patricia