From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7cda96e9413b780c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-16 18:25:13 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!arclight.uoregon.edu!news.tufts.edu!uunet!dca.uu.net!ash.uu.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr14.news.prodigy.com.POSTED!3bae8248!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Floating Decimal Package/Library? References: <3D345DB3.5080609@cogeco.ca> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 172.140.110.16 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr14.news.prodigy.com 1026869097 ST000 172.140.110.16 (Tue, 16 Jul 2002 21:24:57 EDT) NNTP-Posting-Date: Tue, 16 Jul 2002 21:24:57 EDT Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: OH\IRYOGTRUSP_@YMZJ\_Q\@TJ_ZTB\MV@BNMRQIMASJETAANVW[AKWZE\]^XQWIGNE_[EBL@^_\^JOCQ^RSNVLGTFTKHTXHHP[NB\_C@\SD@EP_[KCXX__AGDDEKGFNB\ZOKLRNCY_CGG[RHT_UN@C_BSY\G__IJIX_PLSA[CCFAULEY\FL\VLGANTQQ]FN Date: Wed, 17 Jul 2002 01:24:57 GMT Xref: archiver1.google.com comp.lang.ada:27173 Date: 2002-07-17T01:24:57+00:00 List-Id: > Finally, I should mention that I am using GNAT. Unless I > am mistaken, it seemed that the decimal support wasn't > exactly decimal (I'd have to go back and recheck, but I > got the impression that it is implemented in binary > floating point). If it truly is implemented in decimal, You got the wrong impression. Decimal is implemented as decimal, not binary. type Change_In_My_Pocket is delta 0.01 digits 3; allows values up to $9.99 with one penny precision. type Gates_Tax_Calculations is delta 1.0 digits 11; allows values up to $99 billion with rounding to whole dollars. > Systems that are written to use binary floats for accounting > purposes, always leave the programmer with > the joy all of those "off by one penny" errors. Are you aware of the Information Systems Annex? It's there to make decimal accounting programming easy.