Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.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: Sun, 07 Aug 2011 11:26:51 -0500 Date: Sun, 07 Aug 2011 09:26:54 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 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: 29 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.230.203.65 X-Trace: sv3-6iCyDdnjsj8U02LB0rENMo/XYFYc/yEAqlPUNxvQ9MmTxr0hQACeYpNc02UWTm+qIAfQQxwnzTydLBA!tsQCldh4RXjQXCb9/6XryfCsvq5ds6h1I2iJu0lm53LcQ6cBW5MYXQqmNOuBdOz0b2amStNJ9IQE!QQGBCNkt4CTxI/FVesqO13QcpC3ieBvsgR7w4KwyiM/WTw== 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: 2718 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6854 On 8/7/2011 8:24 AM, Jan Burse wrote: ... > Lower or higher precisions might be covered by IEEE 754, > but there are also a couple of other standards around, > like IEEE 854 which is closer to BigDecimal, since the exponent > is base 10. IEEE 754 permits extended forms of the two precisions, 32 bit and 64 bit. Essentially, Java floating point arithmetic is a simplification of IEEE 754 without e.g. user selection of rounding mode. > > I gave Math.sin(2*Math.PI) only as an example of what I > eventually want to do with the higer precision floats. > But since I do not have the higher precision floats, I > showed how the myHighPrecPackage.sin(2*myHighPrecPackage.PI) > would work with normal precision. One can often make some particular combination of calculations give a more precise answer by some variations in the arithmetic. However, this does not give much indication of the real requirements. Do calculations involving trig functions of integer multiples of pi need to be exact in some application, even if trig functions of other angles have normal rounding behavior? If so, why? Or do you need trig functions in general to be more precise? Patricia