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,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c872b4c479fe6a9b X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: financial computations Date: 2000/05/09 Message-ID: <8f9o7c$q3o$1@nnrp1.deja.com>#1/1 X-Deja-AN: 621230389 References: <391725AA.4F68ED72@gmx.de> <39182D26.F4FDB0F8@quadruscorp.com> <8f93qg$1g9$1@nnrp1.deja.com> <39182A7C.C1358EE2@easystreet.com> X-Http-Proxy: 1.0 x38.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Tue May 09 19:17:19 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-05-09T00:00:00+00:00 List-Id: In article <39182A7C.C1358EE2@easystreet.com>, Al Christians wrote: > Robert Dewar wrote: > > > > What artithmetic do you use in these functions? > > Note that the use of floating-point for many financial > > computations, e.g. interest rate calculations for many > > instruments, is illegal. > > > > This would be way off-topic for this newsgroup, except that > you > are stating it as a reason to use your firm's product, so I'll > inquire: What do you mean? What instruments? Illegal where? > According to what law or ruling? Are you typing about the SIA > rules for bond calculations? Certainly not the truth in lending > law? The Cobol Programmers' Full Employment Act? No, I'm not stating it as "a reason to use [my] firm's product." As far as I know, almost no one is doing fiscal calculations in Ada 95. I do know of Ada 83 fiscal calculations that use scaled integer arithmetic. The point is that in several contexts, including bond interest calculations, the calculation of interest must be done precisely in decimal arithmetic, with specified truncation or rounding semantics. You can only approximate this in floating-point. > Fixed-point decimal exponentiation is what ought to be > illegal, on the grounds that it takes to long, as anyone who > has done this in Cobol knows too well. COBOL has no defined semantics for exponentiation, so I do not know what you are talking about here at all. Sent via Deja.com http://www.deja.com/ Before you buy.