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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,18f7f6e041b3e0bf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-15 14:55:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.mailgate.org!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: "Robert C. Leif" Newsgroups: comp.lang.ada Subject: Decimal Floating types was RE: Information Systems Annex was RE: Dispatching and generics - language lawyer question Date: Thu, 15 Aug 2002 14:54:09 -0700 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1029448504 94245 137.194.161.2 (15 Aug 2002 21:55:04 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 15 Aug 2002 21:55:04 +0000 (UTC) Return-Path: X-Envelope-From: rleif@rleif.com X-Envelope-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal In-Reply-To: <5ee5b646.0208150126.ac9f65e@posting.google.com> Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.12 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:28080 Date: 2002-08-15T14:54:09-07:00 From: Bob Leif To: Robert Dewar et al. Please see IBM http://www2.hursley.ibm.com/decimal/ "Standard Decimal Arithmetic" "Most computers today support binary floating-point in hardware. While suitable for many purposes, binary floating-point should not be used for financial, commercial, and user-centric applications and web services because the decimal data used in these applications cannot be represented exactly using binary floating-point. (See the Frequently Asked Questions page for more reasons and examples.) " "The problems of binary floating-point can be avoided by using base 10 (decimal) exponents and preserving those exponents where possible. This site describes a decimal arithmetic which achieves the necessary results and conforms to the relevant ANSI and IEEE standards. Notably, a single data type can be used for integer, fixed-point, and floating-point decimal arithmetic." Since COBOL does not have a decimal floating point, COBOL programmers, who still do most of the financial applications, have not had a chance to try it!. There is another class of financial programmers, the Wall Street analysts. The analysts do derivatives and other exotic financial instruments. Do they use conventional binary floating point or COBOL decimal? I might note that you have in the past quite properly cautioned on the complexity of conventional floating point calculations. One good way to check them would be to employ a decimal floating point. On a philosophical level, since computers are supposed to work for humans, why not have them work in the most understandable way? I would greatly prefer my spreadsheets and computer assisted mechanical design programs be in decimal. Humans work in pseudo-integer space. We like our numbers and dimensions, in particular, to be a float that corresponds to an integer followed by a decimal point, followed by zeros. Designers do not like to fiddle with a dimension that comes out 28.998. We greatly prefer 29.000. -----Original Message----- From: comp.lang.ada-admin@ada.eu.org [mailto:comp.lang.ada-admin@ada.eu.org] On Behalf Of Robert Dewar Sent: Thursday, August 15, 2002 2:27 AM To: comp.lang.ada@ada.eu.org Subject: Re: Information Systems Annex was RE: Dispatching and generics - language lawyer question "Robert C. Leif" wrote in message news:... > Ada decimal types (as currently defined) are fixed-point > types. > > Are you asking for decimal floating-point? Decimal floating-point would be quite useless in financial applications as far as I can see (COBOL does not have this facility). What you need in financial calculations is decimal fixed-point, and very occasionally (this has only recently been included in the COBOL standard) binary fpt.