Path: csiph.com!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: [OT] Re: missing import java.lang.Comparable Date: Tue, 12 Jul 2016 20:31:05 -0400 Organization: Aioe.org NNTP Server Lines: 23 Message-ID: References: <128e7e20-d311-413d-abbc-e885b34ae402@googlegroups.com> <87dc5bee-f689-4f2e-90a8-a43a2de9fe49@googlegroups.com> <638a1d64-f125-4456-a20b-4dbf45f49da2@googlegroups.com> <60a5ccde-2657-48d6-b3dd-04ec1a0973ab@googlegroups.com> <6f69c451-849d-4672-9025-7880a62bd72d@googlegroups.com> <0e340240-f2ae-470f-8562-3e7f3d630074@googlegroups.com> NNTP-Posting-Host: 7SK6yTFfqwlIPNBLl3l7Qg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:34872 On 7/12/2016 2:37 PM, Eric Douglas wrote: > On Monday, July 11, 2016 at 10:30:25 PM UTC-4, Arne Vajhøj wrote: >> Just use BigDecimal and forget about the overhead compared to >> simple types. > > Well, I ran a text search on my API and found "double" 632 times so > it probably doesn't make sense to get rid of all, now I just need to > figure out where it matters. If we're putting a value into an object > that's supposed to represent something, say inventory on hand, > possibly doing a calculation then getting the result out of the > object it should matter. If I'm using a number of characters divided > by a font size to calculate a location to print something on a page > I'm sure it doesn't matter if the result is off by > .00000000000000000003. There are lots of cases where FP is perfectly valid. Just ask the question: is +/- a little bit perfectly valid for this data? A lot of data is really measured with some uncertainty. Arne