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: Fri, 8 Jul 2016 20:11:59 -0400 Organization: Aioe.org NNTP Server Lines: 22 Message-ID: References: <638a1d64-f125-4456-a20b-4dbf45f49da2@googlegroups.com> <60a5ccde-2657-48d6-b3dd-04ec1a0973ab@googlegroups.com> NNTP-Posting-Host: 7SK6yTFfqwlIPNBLl3l7Qg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:34813 On 7/8/2016 5:06 PM, Gene Wirchenko wrote: > On Fri, 8 Jul 2016 16:29:22 -0400, Jerry Stuckle > wrote: >> Financial institutions in the U.S. typically deal with at least four >> decimal places past the cents sign (six decimal places total). That's >> why COBOL is still so popular - it supports packed decimal natively. >> And IBM mainframes have support for packed decimal. Even Intel >> processors support a form of packed decimal, although it's not quite >> natural as on mainframes. > > You can still use floating point for this. Restrict yourself to > integers with no more than the digits of precision supported by the > float, and scale as needed. And what would you gain from that compared to using an integer with the same umber of bits? (except lots of extra chances to create errors) Arne